npm.io
0.0.1 • Published 7 years ago

data-to-sha1

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

data-to-sha1

Calculates a SHA-1 of a given buffer/string

Install

Using yarn:

yarn add data-to-sha1

or using npm:

npm install data-to-sha1

Usage

const fs = require('fs')
const dataToSHA1 = require('data-to-sha1')

const buffer = fs.readFileSync('/path/to/file')

const hash = dataToSHA1(buffer)

Keywords