1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

OMEMO: Switch to sending 12 byte IV

This commit is contained in:
Paul Schaub 2020-02-16 22:15:56 +01:00
parent 9d626bf787
commit 1051cd2640
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -274,13 +274,13 @@ public class OmemoMessageBuilder<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_
}
/**
* Generate a 16 byte initialization vector for AES encryption.
* Generate a 12 byte initialization vector for AES encryption.
*
* @return iv TODO javadoc me please
* @return iv initialization vector
*/
public static byte[] generateIv() {
SecureRandom random = new SecureRandom();
byte[] iv = new byte[16];
byte[] iv = new byte[12];
random.nextBytes(iv);
return iv;
}