Skip to content

Commit c6d4782

Browse files
committed
removed use of Assert
1 parent 11a6acd commit c6d4782

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/test/java/org/bouncycastle/crypto/test/CipherTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.security.SecureRandom;
44

55
import org.bouncycastle.crypto.BlockCipher;
6+
import org.bouncycastle.crypto.BufferedBlockCipher;
7+
import org.bouncycastle.crypto.DefaultBufferedBlockCipher;
68
import org.bouncycastle.crypto.CipherKeyGenerator;
79
import org.bouncycastle.crypto.DataLengthException;
810
import org.bouncycastle.crypto.InvalidCipherTextException;
@@ -253,7 +255,7 @@ static void isEqualTo(
253255
}
254256
}
255257

256-
static void checkCipher(final BlockCipher pCipher, final int datalen)
258+
void checkCipher(final BlockCipher pCipher, final int datalen)
257259
throws Exception
258260
{
259261
final SecureRandom random = new SecureRandom();
@@ -328,7 +330,7 @@ static void checkAEADParemeter(SimpleTest test, int keySize, int ivSize, final i
328330
byte[] ciphertext2 = new byte[cipher.getOutputSize(plaintext.length)];
329331
len = cipher.processBytes(plaintext, 0, plaintext.length, ciphertext2, 0);
330332
len += cipher.doFinal(ciphertext2, len);
331-
isTrue(areEqual(ciphertext1, ciphertext2));
333+
test.isTrue(test.areEqual(ciphertext1, ciphertext2));
332334

333335
test.testException("Invalid value for MAC size: ", "IllegalArgumentException", new TestExceptionOperation()
334336
{

0 commit comments

Comments
 (0)