Generate SHA-256 hashes (in Node and the Browser)
npm install simple-sha256[travis-image]: https://img.shields.io/travis/feross/simple-sha256/master.svg
[travis-url]: https://travis-ci.org/feross/simple-sha256
[npm-image]: https://img.shields.io/npm/v/simple-sha256.svg
[npm-url]: https://npmjs.org/package/simple-sha256
[downloads-image]: https://img.shields.io/npm/dm/simple-sha256.svg
[downloads-url]: https://npmjs.org/package/simple-sha256
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
In Node.js, this package uses crypto.createHash(). In the browser, it uses crypto.subtle.digest().
```
npm install simple-sha256
Async (returns a Promise):
`js
const sha256 = require('simple-sha256')
init()
async function init () {
const hash = await sha256('hey there')
console.log(hash)
// 74ef874a9fa69a86e091ea6dc2668047d7e102d518bebed19f8a3958f664e3da
}
`
Sync:
`js``
const sha256 = require('simple-sha256')
console.log(sha256.sync('hey there'))
// 74ef874a9fa69a86e091ea6dc2668047d7e102d518bebed19f8a3958f664e3da
MIT. Copyright (c) Feross Aboukhadijeh.