I'm creating a server which can store cookies on the web that will contain application settings. The server will accept any data, but I want to encrypt all the settings before storing them in a cookie and decrypt them when reading them out. So I can store very sensitive data like Account Usernames & Passwords in the cookies and the server cannot do anything with it.
My question is now: What is the best way to encrypt such data with a password in JavaScript on the client side? What is the most secure?
I need some code that I can embed into my site and use it from there.