Skip to content

Instantly share code, notes, and snippets.

@sangpire
Created June 11, 2014 07:24
Show Gist options
  • Select an option

  • Save sangpire/b8f87f6bf6266ba8e9a5 to your computer and use it in GitHub Desktop.

Select an option

Save sangpire/b8f87f6bf6266ba8e9a5 to your computer and use it in GitHub Desktop.
node.js `crypto` `.getHashes` `.createHash` `.update` `.digest`
crypto.getHashes().forEach(
function(hash){
try {
console.log(
"%s - %s",
hash,
crypto.createHash(hash).update('STRING_INPUT','utf8').digest('hex')
)
}
catch(e) {}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment