BlockCipher

A block cipher is a data encryption algorithm that operates on blocks.

Methods
void decrypt(byte[] bytes, int off, int len)
Decrypt a number of bytes.
void decrypt(byte[] bytes, int off, int len)
Decrypt a number of bytes. This is done in-place, that means the bytes are overwritten.
Parameters:
bytes - the byte array
off - the start index
len - the number of bytes to decrypt
void encrypt(byte[] bytes, int off, int len)
Encrypt a number of bytes.
void encrypt(byte[] bytes, int off, int len)
Encrypt a number of bytes. This is done in-place, that means the bytes are overwritten.
Parameters:
bytes - the byte array
off - the start index
len - the number of bytes to encrypt
int getKeyLength()
Get the length of the key in bytes.
int getKeyLength()
Get the length of the key in bytes.
Returns:
the length of the key
void setKey(byte[] key)
Set the encryption key used for encrypting and decrypting.
void setKey(byte[] key)
Set the encryption key used for encrypting and decrypting. The key needs to be 16 bytes long.
Parameters:
key - the key

Fields
static int ALIGN = 16

ALIGN = 16

Blocks sizes are always multiples of this number.