data-to-hash
v0.0.1
Published
Calculates a given hash for given data
Downloads
1,645
Maintainers
Readme
data-to-hash
Calculates a given hash of a given buffer/string
Install
Using yarn:
yarn add data-to-hash
or using npm:
npm install data-to-hash
Usage
const fs = require('fs')
const dataToHash = require('data-to-hash')
const buffer = fs.readFileSync('/path/to/file')
const hash = dataToHash('sha256', buffer)