パッケージの詳細

shasum-object

goto-bus-stop4.4mApache-2.01.0.1

get the shasum of a buffer or object

buffer, hash, object, sha1

readme

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

更新履歴

shasum-object change log

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

1.0.1

  • Use strict mode.
  • Testing and documentation improvements.

1.0.0

  • Initial release.