public class AESCryptor extends CryptorBase
Modifier and Type | Class and Description |
---|---|
static class |
AESCryptor.KeySize |
Modifier and Type | Field and Description |
---|---|
static AESCryptor.KeySize |
AES128 |
static AESCryptor.KeySize |
AES192 |
static AESCryptor.KeySize |
AES256 |
Constructor and Description |
---|
AESCryptor() |
AESCryptor(byte[] key) |
AESCryptor(java.lang.String hexKey) |
Modifier and Type | Method and Description |
---|---|
AESCryptor.KeySize |
getKeySize() |
void |
setKey(byte[] key) |
boolean |
setKeySize(AESCryptor.KeySize keySize)
Sets the key size, in number of bytes
|
decrypt, decrypt, encrypt, encrypt, generateKeyFromPassphrase, setHexKey, setIV, setIV, setIV, setIV, setIVHex, setKey, setKeyFromPassphrase
public static final AESCryptor.KeySize AES256
public static final AESCryptor.KeySize AES192
public static final AESCryptor.KeySize AES128
public AESCryptor()
public AESCryptor(java.lang.String hexKey) throws java.lang.Exception
java.lang.Exception
public AESCryptor(byte[] key) throws java.lang.Exception
java.lang.Exception
public boolean setKeySize(AESCryptor.KeySize keySize)
keySize
- either 16 or 32public AESCryptor.KeySize getKeySize()
public void setKey(byte[] key)
setKey
in class CryptorBase