Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Hmac digest only returns a digest once?

View gist:663052
1 2 3 4 5 6 7 8 9 10 11
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
Something went wrong with that request. Please try again.