Yes, Node.js Crypto module supports cryptography. It provides cryptographic functionality that includes a set of wrappers for open SSL’s hash HMAC, cipher, decipher, sign and verify functions. For example:
- const crypto = require(‘crypto’);
- const secret = ‘abcdefg’;
- const hash = crypto.createHmac(‘sha256’, secret)
- .update(‘Welcome to JavaTpoint’)
- .digest(‘hex’);
- console.log(hash);