Skip to content

Instantly share code, notes, and snippets.

@Honigbaum
Created September 25, 2012 15:11
Show Gist options
  • Save Honigbaum/3782508 to your computer and use it in GitHub Desktop.
Save Honigbaum/3782508 to your computer and use it in GitHub Desktop.
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