class PhpAesCipher implements CipherInterface (View source)

The PhpAesCipher class.

Constants

KEY_128BIT

KEY_192BIT

KEY_256BIT

Methods

string
decrypt(string $data, string $key = null, string $iv = null)

Method to decrypt a data string.

string
encrypt(string $data, string $key = null, string $iv = null)

Method to encrypt a data string.

Details

at line line 44
string decrypt(string $data, string $key = null, string $iv = null)

Method to decrypt a data string.

Parameters

string $data The encrypted string to decrypt.
string $key The private key.
string $iv The public key.

Return Value

string The decrypted data string.

at line line 61
string encrypt(string $data, string $key = null, string $iv = null)

Method to encrypt a data string.

Parameters

string $data The data string to encrypt.
string $key The private key.
string $iv The public key.

Return Value

string The encrypted data string.

Exceptions

InvalidArgumentException