Skip to content

Instantly share code, notes, and snippets.

@davalapar
Created March 22, 2019 00:46
Show Gist options
  • Save davalapar/291142144ad10bbc13e2aa9c25f25f08 to your computer and use it in GitHub Desktop.
Save davalapar/291142144ad10bbc13e2aa9c25f25f08 to your computer and use it in GitHub Desktop.
sha256.js
const crypto = require('crypto');
const sha256 = s => crypto.createHash('sha256').update(s, 'utf8').digest('hex');
module.exports = { sha256 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment