JavaScript string encryption and decryption?

I’m interested in building a small app for personal use that will encrypt and decrypt information on the client side using JavaScript. The encrypted information will be stored in a database on a server, but never the decrypted version.

It doesn’t have to be super duper secure, but I would like to use a currently unbroken algorithm.

Ideally I’d be able to do something like

var gibberish = encrypt(string, salt, key);

to generate the encoded string, and something like

var sensical = decrypt(gibberish, key);

to decode it later.

So far I’ve seen this:

Any other libraries I should look at?

58 thoughts on “JavaScript string encryption and decryption?”

Leave a Comment