class AbstractMcryptCipher implements CipherInterface (View source)

deprecated PHP7 already deprecated mcrypt extension

The McryptCipher class.

Methods

__construct()

Constructor.

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.

string
getIVKey()

getIVKey

integer
getIVSize()

getIVSize

Details

at line line 50
__construct()

Constructor.

Exceptions

RuntimeException

at line line 69
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 109
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

at line line 126
string getIVKey()

getIVKey

Return Value

string

at line line 143
integer getIVSize()

getIVSize

Return Value

integer