Tsugi

AesCtr extends Aes
in package

Table of Contents

Methods

cipher()  : array<string|int, mixed>
AES Cipher function: encrypt 'input' with Rijndael algorithm
decrypt()  : string
Decrypt a text encrypted by AES in counter mode of operation
encrypt()  : string
Encrypt a text using AES encryption in Counter mode of operation - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
keyExpansion()  : array<string|int, mixed>
Key expansion for Rijndael cipher(): performs key expansion on cipher key to generate a key schedule
legacyEncrypt()  : string
LEGACY Encrypt a text using AES encryption in Counter mode of operation - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
urs()  : mixed

Methods

cipher()

AES Cipher function: encrypt 'input' with Rijndael algorithm

public static cipher(mixed $input, mixed $w) : array<string|int, mixed>
Parameters
$input : mixed
$w : mixed
Return values
array<string|int, mixed> —

ciphertext as byte-array (16 bytes)

decrypt()

Decrypt a text encrypted by AES in counter mode of operation

public static decrypt(mixed $ciphertext, mixed $password, mixed $nBits) : string
Parameters
$ciphertext : mixed
$password : mixed
$nBits : mixed
Return values
string —

decrypted text

encrypt()

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

public static encrypt(mixed $plaintext, mixed $password, mixed $nBits) : string

Unicode multi-byte character safe

Parameters
$plaintext : mixed
$password : mixed
$nBits : mixed
Return values
string —

encrypted text

keyExpansion()

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

public static keyExpansion(mixed $key) : array<string|int, mixed>
Parameters
$key : mixed
Return values
array<string|int, mixed> —

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

legacyEncrypt()

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

public static legacyEncrypt(mixed $plaintext, mixed $password, mixed $nBits) : string

Unicode multi-byte character safe

Parameters
$plaintext : mixed
$password : mixed
$nBits : mixed
Return values
string —

encrypted text

urs()

public static urs(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed

        
On this page

Search results