Skip to content

Commit

Permalink
Reduce AttachmentCipherTest flakiness.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Mar 19, 2020
1 parent de48cf8 commit a62183c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void test_attachment_decryptFailOnBadMac() throws IOException {
EncryptResult encryptResult = encryptData(plaintextInput, key);
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);

badMacCiphertext[badMacCiphertext.length - 1] = 0;
badMacCiphertext[badMacCiphertext.length - 1] += 1;

cipherFile = writeToFile(badMacCiphertext);

Expand Down Expand Up @@ -191,7 +191,7 @@ public void test_sticker_decryptFailOnBadMac() throws IOException {
EncryptResult encryptResult = encryptData(plaintextInput, expandPackKey(packKey));
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);

badMacCiphertext[badMacCiphertext.length - 1] = 0;
badMacCiphertext[badMacCiphertext.length - 1] += 1;

AttachmentCipherInputStream.createForStickerData(badMacCiphertext, packKey);
} catch (InvalidMessageException e) {
Expand Down

0 comments on commit a62183c

Please sign in to comment.