Class AESEncryptor


public final class AESEncryptor extends SecretKeyEncryptor
A class to encrypt/decrypt data using AES.
Since:
6.4
Version:
10.1
Author:
Luke
  • Constructor Details

    • AESEncryptor

      public AESEncryptor(byte[] keyData) throws CryptoException
      Create a new AES encryptor given an arbitrary key.
      Parameters:
      keyData - the key data. Only the first 16 or 32 bytes are used
      Throws:
      CryptoException - if the encryptor cannot be initialized
    • AESEncryptor

      public AESEncryptor(byte[] keyData, byte[] iv) throws CryptoException
      Create a new AES encryptor given an arbitrary key.
      Parameters:
      keyData - the key data. Only the first 16 or 32 bytes are used
      iv - the Initialization Vector, or null
      Throws:
      CryptoException - if the encryptor cannot be initialized
    • AESEncryptor

      public AESEncryptor(String keyData)
      Create a new AES encryptor given an arbitrary key string.
      Parameters:
      keyData - the key string. Only the first 24 characters are used
      Throws:
      CryptoException - if the encryptor cannot be initialized