I want to create a hash of I love cupcakes (signed with the key abcdeg)
I love cupcakes
abcdeg
How can I create that hash, using Node.js Crypto?
Documentation for crypto: http://nodejs.org/api/crypto.html
const crypto = require('crypto') const text = 'I love cupcakes' const key = 'abcdeg' crypto.createHmac('sha1', key) .update(text) .digest('hex')
1.4m articles
1.4m replys
5 comments
57.0k users