npm.io
0.0.1 • Published 7 years ago

data-to-hash

Licence
MIT
Version
0.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
3

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)

Keywords