mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
Add chunk IV to chunk MAC
This commit is contained in:
parent
24e573e537
commit
3970a30e14
@ -256,6 +256,7 @@ public class FullBackupExporter extends FullBackupBase {
|
|||||||
try {
|
try {
|
||||||
Conversions.intToByteArray(iv, 0, counter++);
|
Conversions.intToByteArray(iv, 0, counter++);
|
||||||
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
||||||
|
mac.update(iv);
|
||||||
|
|
||||||
byte[] buffer = new byte[8192];
|
byte[] buffer = new byte[8192];
|
||||||
int read;
|
int read;
|
||||||
|
@ -171,6 +171,7 @@ public class FullBackupImporter extends FullBackupBase {
|
|||||||
try {
|
try {
|
||||||
Conversions.intToByteArray(iv, 0, counter++);
|
Conversions.intToByteArray(iv, 0, counter++);
|
||||||
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
||||||
|
mac.update(iv);
|
||||||
|
|
||||||
byte[] buffer = new byte[8192];
|
byte[] buffer = new byte[8192];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user