class AbstractCipher implements CipherInterface (View source)

The Openssl Cipher class.

Methods

__construct()

Constructor.

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

Method to encrypt a data string.

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

Method to decrypt a data string.

string
getIVKey()

getIVKey

integer
getIVSize()

getIVSize

string
getMethod()

Method to get property Type

Details

at line line 52
__construct()

Constructor.

Exceptions

RuntimeException

at line line 72
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 95
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 128
string getIVKey()

getIVKey

Return Value

string

at line line 145
integer getIVSize()

getIVSize

Return Value

integer

at line line 155
string getMethod()

Method to get property Type

Return Value

string