diff options
Diffstat (limited to 'plugins/omemo/src/logic/encrypt.vala')
| -rw-r--r-- | plugins/omemo/src/logic/encrypt.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/omemo/src/logic/encrypt.vala b/plugins/omemo/src/logic/encrypt.vala index e5d11c69..94203ac9 100644 --- a/plugins/omemo/src/logic/encrypt.vala +++ b/plugins/omemo/src/logic/encrypt.vala @@ -26,9 +26,9 @@ namespace Dino.Plugins.Omemo { //Create a key and use it to encrypt the message uint8[] key = new uint8[KEY_SIZE]; - Plugin.get_context().randomize(key); + Crypto.randomize(key); uint8[] iv = new uint8[IV_SIZE]; - Plugin.get_context().randomize(iv); + Crypto.randomize(iv); uint8[] aes_encrypt_result = aes_encrypt(Cipher.AES_GCM_NOPADDING, key, iv, plaintext.data); uint8[] ciphertext = aes_encrypt_result[0:aes_encrypt_result.length - 16]; @@ -128,4 +128,4 @@ namespace Dino.Plugins.Omemo { encryption_data.add_device_key(device_id, device_key.serialized, device_key.type == CiphertextType.PREKEY); } } -}
\ No newline at end of file +} |
