Commit 04b75e81 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Dont use pycrypto anymore

parent cea0d08f
......@@ -35,7 +35,6 @@ from axolotl.sessionbuilder import SessionBuilder
from axolotl.sessioncipher import SessionCipher
from axolotl.state.prekeybundle import PreKeyBundle
from axolotl.util.keyhelper import KeyHelper
from Crypto.Random import get_random_bytes
from .aes_gcm import NoValidSessions, decrypt, encrypt
from .liteaxolotlstore import (LiteAxolotlStore, DEFAULT_PREKEY_AMOUNT,
......@@ -218,8 +217,8 @@ class OmemoState:
return result
def create_msg(self, from_jid, jid, plaintext):
key = get_random_bytes(16)
iv = get_random_bytes(16)
key = os.urandom(16)
iv = os.urandom(16)
encrypted_keys = {}
devices_list = self.device_list_for(jid)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment