Class AesEncryptionStrategy


  • public final class AesEncryptionStrategy
    extends EncryptionStrategy
    This is implementation of an AES encryption strategy, allowing you to specify the key size, iteration count and passphrase.
    • Constructor Detail

      • AesEncryptionStrategy

        public AesEncryptionStrategy​(java.lang.String passphrase)
      • AesEncryptionStrategy

        public AesEncryptionStrategy​(int keySize,
                                     int iterationCount,
                                     java.lang.String passphrase)
      • AesEncryptionStrategy

        public AesEncryptionStrategy​(int keySize,
                                     int iterationCount,
                                     java.lang.String salt,
                                     java.lang.String iv,
                                     java.lang.String passphrase)
    • Method Detail

      • encrypt

        public java.lang.String encrypt​(java.lang.String plaintext)
                                 throws java.lang.Exception
        Specified by:
        encrypt in class EncryptionStrategy
        Throws:
        java.lang.Exception
      • decrypt

        public java.lang.String decrypt​(java.lang.String ciphertext)
                                 throws java.lang.Exception
        Specified by:
        decrypt in class EncryptionStrategy
        Throws:
        java.lang.Exception
      • getKeySize

        public int getKeySize()
      • getIterationCount

        public int getIterationCount()
      • getSalt

        public java.lang.String getSalt()
      • getIv

        public java.lang.String getIv()