|
|
|
@ -204,11 +204,20 @@ public class FullBackupImporter extends FullBackupBase {
|
|
|
|
|
mac.update(buffer, 0, read);
|
|
|
|
|
|
|
|
|
|
byte[] plaintext = cipher.update(buffer, 0, read);
|
|
|
|
|
|
|
|
|
|
if (plaintext != null) {
|
|
|
|
|
out.write(plaintext, 0, plaintext.length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
length -= read;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
byte[] plaintext = cipher.doFinal();
|
|
|
|
|
|
|
|
|
|
if (plaintext != null) {
|
|
|
|
|
out.write(plaintext, 0, plaintext.length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
out.close();
|
|
|
|
|
|
|
|
|
|
byte[] ourMac = mac.doFinal();
|
|
|
|
@ -225,7 +234,7 @@ public class FullBackupImporter extends FullBackupBase {
|
|
|
|
|
//destination.delete();
|
|
|
|
|
throw new IOException("Bad MAC");
|
|
|
|
|
}
|
|
|
|
|
} catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
|
|
|
|
|
} catch (InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException e) {
|
|
|
|
|
throw new AssertionError(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|