Skip to content

Instantly share code, notes, and snippets.

@RichardHJensen
Created September 22, 2011 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardHJensen/1234750 to your computer and use it in GitHub Desktop.
Save RichardHJensen/1234750 to your computer and use it in GitHub Desktop.
Made the steps in the initial test a bit more explicit.
public class AESEncryptorTest {
private final AESEncryptor aesExample = new AESEncryptor();
private static String SAMPLE_TEXT = "Original Plaintext";
@Test
public void decryptingCiphertextShouldReturnOriginalPlaintext() throws Exception {
String cipherText = aesExample.encrypt(SAMPLE_TEXT);
String plainText = aesExample.decrypt(cipherText);
assertEquals(SAMPLE_TEXT, plainText);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment