@Test public void testCardDataDecrypt() throws Exception { String data = "4012888888881881"; String encryptedData = AES.encode(AES.encrypt(AES.pack(data), testKey.getBytes())); assertFalse(encryptedData.equals(data)); assertThat(decryptor.accessFormattedData(encryptedData, null), is(data)); }
@Override public String accessFormattedData(String dataIn, String format) throws DecryptionException { return accessGenericData(dataIn); }
AESDecryptor implements Decryptor { @Override public String accessFormattedData(String dataIn, String format) throws DecryptionException { return accessGenericData(dataIn); } }
AESDecryptor implements Decryptor { @Override public String accessFormattedData(String dataIn, String format) throws DecryptionException { return accessGenericData(dataIn); } AESDecryptor(byte[] key); }
AESDecryptor implements Decryptor { @Override public String accessFormattedData(String dataIn, String format) throws DecryptionException { return accessGenericData(dataIn); } AESDecryptor(byte[] key); @Override String accessSocialSecurityNumber(String socialSecurityNumber); @Override String accessFormattedData(String dataIn, String format); @Override String accessGenericData(String dataIn); }
AESDecryptor implements Decryptor { @Override public String accessFormattedData(String dataIn, String format) throws DecryptionException { return accessGenericData(dataIn); } AESDecryptor(byte[] key); @Override String accessSocialSecurityNumber(String socialSecurityNumber); @Override String accessFormattedData(String dataIn, String format); @Override String accessGenericData(String dataIn);  }