Created
April 11, 2019 14:23
-
-
Save jaredreich/68083a7fa050574f6f0c4c4136376170 to your computer and use it in GitHub Desktop.
Browser-side JavaScript AES Encryption
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
const crypto = require('sjcl') | |
const iter = 1000 | |
const ks = 256 | |
export const decrypt = (password, encrypted) => crypto.decrypt(password, encrypted) | |
export const encrypt = (password, text) => crypto.encrypt(password, text, { iter, ks }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment