Skip to content

Instantly share code, notes, and snippets.

@physacco
Created March 25, 2013 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save physacco/5237141 to your computer and use it in GitHub Desktop.
Save physacco/5237141 to your computer and use it in GitHub Desktop.
Basic usage example of SJCL.
// Basic usage example of SJCL.
// Tested on firefox 20.0 and nodejs 0.8.
// Refer to: http://crypto.stanford.edu/sjcl/
var sjcl = require("./sjcl");
var plaintext = "大丈夫だ、問題ない";
var encrypted = sjcl.encrypt("password", plaintext);
console.log(encrypted);
var decrypted = sjcl.decrypt("password", encrypted);
console.log(plaintext == decrypted);
@Visgean
Copy link

Visgean commented Dec 18, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment