Skip to content

Instantly share code, notes, and snippets.

@Southern
Created October 23, 2012 02:33
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 Southern/4b136327b51855ee8e4e to your computer and use it in GitHub Desktop.
Save Southern/4b136327b51855ee8e4e to your computer and use it in GitHub Desktop.
/*
Typically supported by OpenSSL:
RSA-MD4 => MD4
RSA-MD5 => MD5
RSA-RIPEMD160 => RIPEMD160
RSA-SHA => SHA
RSA-SHA1 => SHA1
RSA-SHA1-2 => RSA-SHA1
RSA-SHA224 => SHA224
RSA-SHA256 => SHA256
RSA-SHA384 => SHA384
RSA-SHA512 => SHA512
*/
var crypto = require('crypto');
var hash = crypto.createHash('RSA-SHA512');
hash.update('testing');
console.log(hash.digest('hex'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment