title: Javascript - Best way to encrypt data with password
body: <p>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 &amp; Passwords in the cookies and the server cannot do anything with it.</p>
  
  <p>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?</p>
  
  <p>I need some code that I can embed into my site and use it from there.</p>