Created
March 25, 2013 13:36
-
-
Save physacco/5237141 to your computer and use it in GitHub Desktop.
Basic usage example of SJCL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1