class AesCtr extends Aes

Methods

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

AES Cipher function: encrypt 'input' with Rijndael algorithm

from Aes
static array
keyExpansion(key $key)

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

from Aes
static string
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 
legacyEncrypt($plaintext, $password, $nBits)

No description

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

Decrypt a text encrypted by AES in counter mode of operation

static 
urs($a, $b)

No description

Details

in Aes at line 21
static array 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

array ciphertext as byte-array (16 bytes)

in Aes at line 94
static array 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

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

at line 34
static string 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

string encrypted text

at line 51
static legacyEncrypt($plaintext, $password, $nBits)

Parameters

$plaintext
$password
$nBits

at line 120
static string 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

string decrypted text

at line 185
static urs($a, $b)

Parameters

$a
$b