I am working with a cross script vulnerability issue which will expose an id and email via cookie (since I am storing using a cookie ), with that any hacker can use the email and id to send a request to server using malicious java script I wanted to know whether I can encrypt a cookie , if so how to implement it and store in a remote database using web service SOAP/REST . I also wanted to decrypt the cookie from the database stored (MS SQL 2011) using bmc remedy . Please do help me how to do that .
I need help on two things
1) which is the best and safest algorithm to encrypt a cookie
2) How to decrypt the encrypted cookie in bmc remedy