| Modifier and Type | Field and Description |
|---|---|
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.
|
| 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.
|
protected static byte[] |
newIv(Random random)
Generates a new initialization vector.
|
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
protected static byte[] newIv(Random random)
random - a random to use.public static byte[] newIv()
public abstract byte[] encrypt(byte[] iv,
byte[] decrypted)
decrypted. Any implementation/provider specific
exception will thrown as wrapped in a RuntimeException.iv - initialization vectordecrypted - the bytes to encryptpublic abstract byte[] decrypt(byte[] iv,
byte[] encrypted)
encrypted. Any implementation/provider specific
exception will be thrown as wrapped in a RuntimeException.iv - initialization vectorencrypted - the bytes to decryptCopyright © 2011-2013. All Rights Reserved.