Class AESEncryptor
java.lang.Object
org.deltava.crypt.SecretKeyEncryptor
org.deltava.crypt.AESEncryptor
A class to encrypt/decrypt data using AES.
- Since:
- 6.4
- Version:
- 10.1
- Author:
- Luke
-
Constructor Summary
ConstructorsConstructorDescriptionAESEncryptor
(byte[] keyData) Create a new AES encryptor given an arbitrary key.AESEncryptor
(byte[] keyData, byte[] iv) Create a new AES encryptor given an arbitrary key.AESEncryptor
(String keyData) Create a new AES encryptor given an arbitrary key string. -
Method Summary
Methods inherited from class org.deltava.crypt.SecretKeyEncryptor
decrypt, encrypt, getAlgorithm, initKey, setKey, trimKeySize
-
Constructor Details
-
AESEncryptor
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
Create a new AES encryptor given an arbitrary key.- Parameters:
keyData
- the key data. Only the first 16 or 32 bytes are usediv
- the Initialization Vector, or null- Throws:
CryptoException
- if the encryptor cannot be initialized
-
AESEncryptor
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
-