data-to-hash

Calculates a given hash for given data

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
data-to-hash
3190.0.14 years ago4 years agoMinified + gzip package size for data-to-hash in KB

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)