Skip to content

Instantly share code, notes, and snippets.

@carsonfarmer
Created June 14, 2018 06:49
Show Gist options
  • Save carsonfarmer/fda5a498b1bdd801d8da3204fe8a4cf4 to your computer and use it in GitHub Desktop.
Save carsonfarmer/fda5a498b1bdd801d8da3204fe8a4cf4 to your computer and use it in GitHub Desktop.
decryption
crypto.aes.create(Buffer.from(key), iv, (err, cipher) => {
if (!err) {
cipher.decrypt(Buffer.from(message.value, 'base64'), async (err, plain) => {
if (!err) {
output.innerText = `${plain.toString('utf-8')}`
}
})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment