Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing Passwords in HTML5 LocalStorage

I need to store passwords in the HTML5 LocalStorage (No, I can't use hashes and I can't ask the user to type his password).

What is the most secure way to do this? I understand that this can never be really safe, but I'm just looking to secure this as much as possible.

Can you do encryption in JavaScript? If yes, what is the best encryption algorithm for this task?

Thank you.

like image 950
Alon Gubkin Avatar asked Jul 13 '11 10:07

Alon Gubkin


1 Answers

The closure library has a set of encoding algorithms in Javascript, maybe one of those can help: http://code.google.com/p/closure-library/source/browse/#svn%2Ftrunk%2Fclosure%2Fgoog%2Fcrypt

like image 158
Ernest Avatar answered Oct 03 '22 07:10

Ernest