Skip to content

Instantly share code, notes, and snippets.

Created September 2, 2013 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6410459 to your computer and use it in GitHub Desktop.
Save anonymous/6410459 to your computer and use it in GitHub Desktop.
var orderString = 'some string';
var private_key = fs.readFileSync('./pem/rsa_private_key.pem');
var signer = crypto.createSign('RSA-SHA1');
signer.update(orderString);
var sign = signer.sign(private_key,'base64');
response.end(sign);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment