Skip to content

Commit 6385048

Browse files
Merge pull request #47 from SalusaSecondus/allIvsFix
Fix FrameEncryptionHandlerVeryLongTest so that last frame is final.
2 parents 4097429 + f6464b7 commit 6385048

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/com/amazonaws/encryptionsdk/internal/FrameEncryptionHandlerVeryLongTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ public void exhaustiveIVCheck() throws Exception {
4343
expectedNonce.putInt(0);
4444
expectedNonce.putLong(i);
4545

46-
frameEncryptionHandler_.processBytes(buf, 0, 1, buf, 0);
46+
if (i != Constants.MAX_FRAME_NUMBER) {
47+
frameEncryptionHandler_.processBytes(buf, 0, 1, buf, 0);
48+
} else {
49+
frameEncryptionHandler_.doFinal(buf, 0);
50+
}
4751

4852
CipherFrameHeaders headers = new CipherFrameHeaders();
4953
headers.setNonceLength(algorithm.getNonceLen());

0 commit comments

Comments
 (0)