Cookie Crypt Trait.
Provides the encrypt/decrypt logic for the CookieComponent.
$_validCiphers
protected array
Explode method to return array from string set in CookieComponent::_implode() Maintains reading backwards compatibility with 1.x CookieComponent::_implode().
_checkCipher( string $encrypt )
Helper method for validating encryption cipher names.
$encrypt
_decode( string $value , string|false $encrypt , string|null $key )
Decodes and decrypts a single value.
$value
$encrypt
$key
_decrypt( array $values , string|boolean $mode , string|null $key null )
Decrypts $value using public $type method in Security class
$values
$mode
$key
optional null _encrypt( string $value , string|boolean $encrypt , string|null $key null )
Encrypts $value using public $type method in Security class
$value
$encrypt
Encryption mode to use. False disabled encryption.
$key
optional null _explode( string $string )
Explode method to return array from string set in CookieComponent::_implode() Maintains reading backwards compatibility with 1.x CookieComponent::_implode().
$string
_getCookieEncryptionKey( )
Returns the encryption key to be used.
_implode( array $array )
Implode method to keep keys are multidimensional arrays
$array
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Utility.CookieCryptTrait.html