Created
June 7, 2012 01:00
-
-
Save mcotton/2885834 to your computer and use it in GitHub Desktop.
Using crypto in Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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