Computer scienceBackendNode.jsCore ConceptsInternal modulesOther modulesHashing: overviewHash function

Intro to crypto module

Crypto module and SHA256 hashing

Report a typo
Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Given the following code snippet, determine which statement is correct regarding the use of the 'crypto' module in Node.js.
const crypto = require('crypto');
const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
                   .update('I love cupcakes')
                   .digest('hex');
console.log(hash);
Select one option from the list
___

Create a free account to access the full topic