Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sha1-hex

fundon3.3kMIT1.0.0

Create a SHA1 hash with hex encoding

hash, crypto, sha1, hex, buffer

readme

sha1-hex Build Status

Create a SHA1 hash with hex encoding

Install

$ npm install --save sha1-hex

Usage

var fs = require('fs');
var sha1Hex = require('sha1-hex');
var buffer = fs.readFileSync('unicorn.png');

sha1Hex(buffer);
//=> '84de6753b298abd027fcd1d790eade2413eafb5a'

API

sha1Hex(input)

input

Required
Type: buffer, string

Prefer buffers as they're faster to hash, but strings can be useful for small things.

License

MIT