sensordb2 e64a8defe5 3.17 | 1 éve | |
---|---|---|
.. | ||
test | 1 éve | |
.travis.yml | 1 éve | |
CHANGELOG.md | 1 éve | |
CODE_OF_CONDUCT.md | 1 éve | |
LICENSE.md | 1 éve | |
README.md | 1 éve | |
bin.js | 1 éve | |
index.js | 1 éve | |
package.json | 1 éve |
get the shasum of a buffer or object
Install - Usage - License: Apache-2.0
npm install shasum-object
var fs = require('fs')
var shasum = require('shasum-object')
shasum('of a string')
shasum(fs.readFileSync('of-a-file.txt'))
shasum({
of: ['an', 'object']
})
shasum(input, algorithm = 'sha1', encoding = 'hex')
Compute the hash for the given input.
input
- a string, buffer or JSON object. objects are stringified using fast-safe-stringify
.algorithm
- the hash algorithm to use. see crypto.createHash
.encoding
- how to encode the hash result. see hash.digest
.