StrongBinaryEncryptor be = new StrongBinaryEncryptor();
// Set password to use
be.setPassword(PASSWORD_FOR_ENCRYPTION);
// Encrypt data. By default the algorithm used is
// PBEWithMD5AndTripleDES
byte[] encryptedData = be.encrypt(data);
// Valid "encrypted" data
byte[] decryptedData = be.decrypt(encryptedData);
Assert.assertArrayEquals(data, decryptedData);
// Create a image file with the decrypted data in order to validate
// that data are not corrupted