Skip to content

Instantly share code, notes, and snippets.

@mcotton
Created June 7, 2012 01:00
Show Gist options
  • Save mcotton/2885834 to your computer and use it in GitHub Desktop.
Save mcotton/2885834 to your computer and use it in GitHub Desktop.
Using crypto in Node.js
var crypto = require('crypto')
, text = 'I love cupcakes'
, salt = 'abcdeg'
, hash
hash = crypto.createHmac('sha1', salt).update(text).digest('hex')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment