diff options
| author | hrxi <hrrrxi@gmail.com> | 2023-11-24 20:53:50 +0100 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2026-10-23 16:58:30 +0200 |
| commit | 76a91fca2fc7dd5975e8ff0e6695f27c98539dba (patch) | |
| tree | 7829340be71fe60ef847247e578c4589571fecc5 /plugins/omemo/src/logic | |
| parent | b013d28182ce582f229185c23b6011f566f1f8cc (diff) | |
Add support for OpenSSL
Uses work by @hrxi in https://github.com/dino/dino/pull/1515
Co-Authored-By: hrxi <hrrrxi@gmail.com>
Diffstat (limited to 'plugins/omemo/src/logic')
| -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 +} |
