Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Stanford Javascript Crypto Library basic AES example
// Basic AES example using the defaults.
var password = "password";
var text = "my secret text";
var parameters = { "iter" : 1000 };
var rp = {};
var cipherTextJson = {};
sjcl.misc.cachedPbkdf2(password, parameters);
cipherTextJson = sjcl.encrypt(password, text, parameters, rp);
var decryptedText = sjcl.decrypt(password, cipherTextJson)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.