s256

Generates a SHA-256 hash from string.

Usage no npm install needed!

<script type="module">
  import s256 from 'https://cdn.skypack.dev/s256';
</script>

README

Generate a SHA-256 hash from a string in Node.js

Generates a lowercase-hex encoded hash from any string in Node.js.

For those who are tired of typing crypto.createHash('sha256').update(str).digest('hex');.

Usage

const sha256 = require('s256');

console.log(sha256('secret_password_123'));