kopia lustrzana https://github.com/ryukoposting/Signal-Android
Add chunk IV to chunk MAC
rodzic
24e573e537
commit
3970a30e14
|
@ -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];
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue