mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
Merge pull request #365 from vanitasvitae/iv12
OMEMO: Switch to sending 12 byte IV
This commit is contained in:
commit
876aba9866
1 changed files with 3 additions and 3 deletions
|
@ -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() {
|
public static byte[] generateIv() {
|
||||||
SecureRandom random = new SecureRandom();
|
SecureRandom random = new SecureRandom();
|
||||||
byte[] iv = new byte[16];
|
byte[] iv = new byte[12];
|
||||||
random.nextBytes(iv);
|
random.nextBytes(iv);
|
||||||
return iv;
|
return iv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue