lithium\storage\session\strategy\Encrypt::_encrypt()
Serialize and encrypt a given data array.
Parameters
-
array
$decrypted
The cleartext data to be encrypted.
Returns
stringA Base64 encoded and encrypted string.
Source
protected function _encrypt($decrypted = []) {
$encrypted = openssl_encrypt(
serialize($decrypted),
'aes-256-cbc',
$this->_hashSecret($this->_config['secret']),
OPENSSL_RAW_DATA,
$vector = $this->_vector()
);
return base64_encode($encrypted) . base64_encode($vector);
}