private static final String MESSAGE = "Nude backgammon with swimsuit models!";
@Test
public void run() {
try {
PassphraseCrypto crypto = BouncyCastlePgpProvider.getInstance().getPassphraseCrypto();
byte[] encrypted = crypto.encrypt(MESSAGE.getBytes(), PASSPHRASE, SymmetricKeyAlgorithm.CAST5);
byte[] decrypted = crypto.decrypt(encrypted, PASSPHRASE);
assertEquals(MESSAGE, new String(decrypted));
}
catch (IOException ex) {
ex.printStackTrace();
fail();