Hash a string with SHA-256 using Node.js's built-in `crypto` module.
solve('hello') → '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'
This module is Node.js-only (no browser equivalent without a polyfill).
const crypto = require('crypto');
crypto.createHash('sha256').update(data).digest('hex');Sample tests