I want to encrypt cookie in browser
Please tell me the different ways to do this
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question isn’t very clear. You should use HTTPS for the connection and set the secure flag to make sure that the cookie is always sent encrypted. I assume that is what you want to do.
If you’re thinking about doing your own encryption in JavaScript then don’t do it because you won’t get the level of neither security nor performance anywhere near that of SSL/TLS that the browser has already built in.
If you’re serious about cookies security then I recommend reading the Secure Cookie Protocol paper by Liu, Kovacs, Huang and Gouda (PDF).