mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 06:23:17 +00:00
Reduce AttachmentCipherTest flakiness.
This commit is contained in:
@@ -129,7 +129,7 @@ public class AttachmentCipherTest extends TestCase {
|
|||||||
EncryptResult encryptResult = encryptData(plaintextInput, key);
|
EncryptResult encryptResult = encryptData(plaintextInput, key);
|
||||||
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);
|
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);
|
||||||
|
|
||||||
badMacCiphertext[badMacCiphertext.length - 1] = 0;
|
badMacCiphertext[badMacCiphertext.length - 1] += 1;
|
||||||
|
|
||||||
cipherFile = writeToFile(badMacCiphertext);
|
cipherFile = writeToFile(badMacCiphertext);
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ public class AttachmentCipherTest extends TestCase {
|
|||||||
EncryptResult encryptResult = encryptData(plaintextInput, expandPackKey(packKey));
|
EncryptResult encryptResult = encryptData(plaintextInput, expandPackKey(packKey));
|
||||||
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);
|
byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length);
|
||||||
|
|
||||||
badMacCiphertext[badMacCiphertext.length - 1] = 0;
|
badMacCiphertext[badMacCiphertext.length - 1] += 1;
|
||||||
|
|
||||||
AttachmentCipherInputStream.createForStickerData(badMacCiphertext, packKey);
|
AttachmentCipherInputStream.createForStickerData(badMacCiphertext, packKey);
|
||||||
} catch (InvalidMessageException e) {
|
} catch (InvalidMessageException e) {
|
||||||
|
Reference in New Issue
Block a user