class SimpleCipher implements CipherInterface (View source)

deprecated This cipher is not safe.

The Simple class.

Constants

DEFAULT_RANDOM_BYTE_LENGTH

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 36
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 96
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