Skip to content

Commit

Permalink
OMEMO: Switch to sending 12 byte IV
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Feb 16, 2020
1 parent 9d626bf commit 1051cd2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ public static byte[] generateKey(String keyType, int keyLength) throws NoSuchAlg
}

/**
* 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;
}
Expand Down

0 comments on commit 1051cd2

Please sign in to comment.