Created
November 4, 2010 19:40
-
-
Save bartt/663052 to your computer and use it in GitHub Desktop.
Hmac digest only returns a digest once?
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
crypto = require('crypto'); | |
hmac = crypto.createHmac('sha256', 'hackme'); | |
hmac.update('bladibla'); | |
hmac.digest('hex'); // '6a405c5f6fe96680a57054cee8a4a74356c2df1b5e5cf8102dac3773af713418' | |
hmac.digest('hex'); // '' -- Hûh?! | |
hmac.update('bladibla'); | |
hmac.digest('hex'); // '' -- Hûh?! Again? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment