Created
September 25, 2012 15:11
-
-
Save Honigbaum/3782508 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 inputVector = new Buffer("c1234567-zipl-03"); | |
var secretKeyHash = new Buffer("GeN8IfCrdxKxMxFA"); | |
var cipher = crypto.createCipheriv('AES-128-CBC', secretKeyHash, inputVector); | |
cipher.update("Test", 'binary', 'binary'); | |
var encryptedHexNumber = cipher.final('hex'); | |
return "1" + encryptedHexNumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment