/** * Test {@link AES256} wrapper for decrypting. * */ @org.junit.Test public void decrypt() throws EncryptionError { AES256 engine = new AES256(); engine.initialize(BlockCipher.Direction.DECRYPT, new SymmetricKey(key1)); byte[] result = engine.transformBlock(ciphertext1); assertArrayEquals(plaintext1, result); } }
/** * Test {@link AES256} wrapper for decrypting. * */ @org.junit.Test public void encrypt() throws EncryptionError { AES256 engine = new AES256(); engine.initialize(BlockCipher.Direction.ENCRYPT, new SymmetricKey(key1)); byte[] result = engine.transformBlock(plaintext1); assertArrayEquals(ciphertext1, result); } /**