I want to know how to safe and encryte to protect my cookie's datas in PHP and Codeigniter
and i want to learn about what the most secure encryption method, nonation
thanks.. :) !
I want to know how to safe and encryte to protect my cookie's datas in PHP and Codeigniter
and i want to learn about what the most secure encryption method, nonation
thanks.. :) !
For encrypt the cookie in codeigniter make changes in the config.php file at
$config['sess_encrypt_cookie'] = FALSE;
change this line to
$config['sess_encrypt_cookie'] = TRUE;
Also set the encryption key at
$config['encryption_key'] = "Your_own_key";
Please Note:
It's worth noting that you shouldn't rely on storing sensitive data with the client, even encrypted. You're more secure to just store the session id (or for longer life, a user id and checksum) in the cookie and keep the sensitive information under your own control in a database (again, encrypted). Using SSL mitigates this issue but it's still not an ideal solution. Also, Cookies can be cleared which may pose problems