Add chunk IV to chunk MAC
This commit is contained in:
parent
24e573e537
commit
3970a30e14
2 changed files with 2 additions and 0 deletions
|
@ -256,6 +256,7 @@ public class FullBackupExporter extends FullBackupBase {
|
|||
try {
|
||||
Conversions.intToByteArray(iv, 0, counter++);
|
||||
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
||||
mac.update(iv);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int read;
|
||||
|
|
|
@ -171,6 +171,7 @@ public class FullBackupImporter extends FullBackupBase {
|
|||
try {
|
||||
Conversions.intToByteArray(iv, 0, counter++);
|
||||
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(cipherKey, "AES"), new IvParameterSpec(iv));
|
||||
mac.update(iv);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue