class AesCtr extends Aes (View source)

Methods

static ciphertext
cipher(input $input, w $w)

AES Cipher function: encrypt 'input' with Rijndael algorithm

from Aes
static key
keyExpansion(key $key)

Key expansion for Rijndael cipher(): performs key expansion on cipher key to generate a key schedule

from Aes
static encrypted
encrypt(plaintext $plaintext, password $password, nBits $nBits)

Encrypt a text using AES encryption in Counter mode of operation - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

static decrypted
decrypt(ciphertext $ciphertext, password $password, nBits $nBits)

Decrypt a text encrypted by AES in counter mode of operation

Details

in Aes at line line 19
static ciphertext cipher(input $input, w $w)

AES Cipher function: encrypt 'input' with Rijndael algorithm

Parameters

input $input message as byte-array (16 bytes)
w $w key schedule as 2D byte-array (Nr+1 x Nb bytes) - generated from the cipher key by keyExpansion()

Return Value

ciphertext as byte-array (16 bytes)

in Aes at line line 92
static key keyExpansion(key $key)

Key expansion for Rijndael cipher(): performs key expansion on cipher key to generate a key schedule

Parameters

key $key cipher key byte-array (16 bytes)

Return Value

key schedule as 2D byte-array (Nr+1 x Nb bytes)

at line line 188
static encrypted encrypt(plaintext $plaintext, password $password, nBits $nBits)

Encrypt a text using AES encryption in Counter mode of operation - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

Unicode multi-byte character safe

Parameters

plaintext $plaintext source text to be encrypted
password $password the password to use to generate a key
nBits $nBits number of bits to be used in the key (128, 192, or 256)

Return Value

encrypted text

at line line 258
static decrypted decrypt(ciphertext $ciphertext, password $password, nBits $nBits)

Decrypt a text encrypted by AES in counter mode of operation

Parameters

ciphertext $ciphertext source text to be decrypted
password $password the password to use to generate a key
nBits $nBits number of bits to be used in the key (128, 192, or 256)

Return Value

decrypted text