javascript
Published on January 26, 2024By DeveloperBreeze
// Import 'crypto' module
const crypto = require('crypto');
// Example password
const password = 'mypassword';
// Create SHA-256 hash of the password
const hash = crypto.createHash('sha256').update(password).digest('hex');
// Log the generated hash
console.log('Hash:', hash);
Comments
Please log in to leave a comment.