You can get that off of the Request object:
$app->request->cookies->get('_hsio');
Question
How to get the encrypted hashed string in Slim Framework. I used:
$app = new \Slim\Slim(array(
'cookies.encrypt' => true,
'cookies.secret_key' => 'MY_SECRET_KEY',
'cookies.cipher' => MCRYPT_RIJNDAEL_256,
'cookies.cipher_mode' => MCRYPT_MODE_CBC
));
$app->setCookie('_hsio', "My Data", '1 day');
$app->getCookie('_hsio');
The above $app->getCookie('_hsio');
will return the decrypted data but i want to get the encrypted hashed string set by setCookie
. Any idea how to get that ?
La solution
You can get that off of the Request object:
$app->request->cookies->get('_hsio');