shasum-object
get the shasum of a buffer or object
Last updated a year ago by goto-bus-stop .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install shasum-object 
SYNC missed versions from official npm registry.

shasum-object

Get the shasum of a buffer or object.

Description - Install - Usage - License: Apache-2.0

npm actions standard

Description

shasum-object computes a hash string for strings, buffers, and JSON objects.

Sha1 is used by default, but other algorithms provided by Node.js are supported.

shasum-object is committed to supporting all Node.js versions 0.8 and up.

This is a spiritual successor to shasum.

Install

npm install shasum-object

Usage

var fs = require('fs')
var shasum = require('shasum-object')

shasum('of a string')
shasum(fs.readFileSync('of-a-file.txt'))

shasum({
  of: ['an', 'object']
})

API

shasum(input, algorithm = 'sha1', encoding = 'hex')

Compute the hash for the given input.

License

Apache-2.0

Current Tags

  • 1.0.1                                ...           latest (a year ago)

2 Versions

  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 2
This Month 4
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (3)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE