| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM
Cipher algorithm.
|
static int |
BLOCK_SIZE
AES block size in bits.
|
static int |
BLOCK_SIZE_IN_BYTES
AES block size in bytes.
|
static int |
KEY_SIZE
Key size in bits.
|
static int |
KEY_SIZE_IN_BYTES
Key size in bytes.
|
static String |
MODE
Cipher mode.
|
static String |
PADDING
Cipher padding.
|
static String |
TRANSFORMATION
Cipher transformation.
|
| Constructor and Description |
|---|
Aes() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
decrypt(byte[] iv,
byte[] encrypted)
Decrypts given
encrypted. |
abstract byte[] |
encrypt(byte[] iv,
byte[] decrypted)
Encrypts given
decrypted. |
static byte[] |
newIv()
Generates a new initialization vector.
|
static Aes |
synchronizedAes(Aes aes)
Returns a synchronized (thread-safe) aes backed by the specified aes.
|
public static final int KEY_SIZE
public static final int KEY_SIZE_IN_BYTES
public static final int BLOCK_SIZE
public static final int BLOCK_SIZE_IN_BYTES
public static final String ALGORITHM
public static final String MODE
public static final String PADDING
public static final String TRANSFORMATION
public static byte[] newIv()
public static Aes synchronizedAes(Aes aes)
aes - the aes to be "wrapped" in a synchronized aes.public abstract byte[] encrypt(byte[] iv,
byte[] decrypted)
decrypted.iv - initialization vectordecrypted - the bytes to encryptpublic abstract byte[] decrypt(byte[] iv,
byte[] encrypted)
encrypted.iv - initialization vectorencrypted - the bytes to decryptCopyright © 2011-2012. All Rights Reserved.