Forked from bobmcwhirter/gist:0a0170b2450cf99a0bef
Last active
August 29, 2015 14:06
-
-
Save abstractj/95fdf5b13e622cd67c43 to your computer and use it in GitHub Desktop.
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
var crypto = require('crypto'); | |
var cipher = crypto.createCipher( process.argv[2], 'tacos' ); | |
//aes-gcm 256 | |
//key size must be 32 | |
var cipher = crypto.createCipheriv('aes-256-gcm', '3zTvzr3p67VC61jmV54rIYu1545x4TlY', 'X6sIq117H0vR'); | |
var cipher = crypto.createCipher('aes-256-gcm', '3zTvzr3p67VC61jmV54rIYu1545x4TlY'); | |
//aes-gcm 128 | |
//key size must be 16 | |
var cipher = crypto.createCipheriv('aes-128-gcm', '3zTvzr3p67VC61jm', 'X6sIq117H0vR'); | |
var cipher = crypto.createCipher('aes-128-gcm', '3zTvzr3p67VC61jm'); | |
cipher.write('bob'); | |
console.log( cipher.final() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment