Skip to content

Instantly share code, notes, and snippets.

@khaosdoctor
Created May 31, 2022 03:14
Show Gist options
  • Save khaosdoctor/4447e596e3f58445327ca04bc21f87ab to your computer and use it in GitHub Desktop.
Save khaosdoctor/4447e596e3f58445327ca04bc21f87ab to your computer and use it in GitHub Desktop.
Simple hashing in Node.js
const crypto = require('crypto')
console.log({
sha256: crypto.createHash('sha256').update('data').digest('hex'),
sha512: crypto.createHash('sha512').update('data').digest('hex')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment