Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
crypto-js aes encrypt descrypt
var CryptoJS = require("crypto-js");//replace this with script tag in browser env
var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase").toString();
var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase").toString(CryptoJS.enc.Utf8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment