Skip to content

Instantly share code, notes, and snippets.

@edewit
Created November 21, 2013 15:43
Show Gist options
  • Select an option

  • Save edewit/7583936 to your computer and use it in GitHub Desktop.

Select an option

Save edewit/7583936 to your computer and use it in GitHub Desktop.
agCrypto.getRandomValue({
success: function (generatedIV) {
agCrypto.deriveKey({
password: 'my password',
success: function (rawPassword) {
agCrypto.encrypt({
options: {
IV: generatedIV,
key: rawPassword,
data: "My Bonnie lies over the ocean, my Bonnie lies over the sea"
},
success: function (cipherText) {
console.log(cipherText);
}
});
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment