You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

shasum-object

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shasum-object

get the shasum of a buffer or object

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

shasum-object

get the shasum of a buffer or object

Install - Usage - License: Apache-2.0

npm travis standard

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.

  • 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.

License

Apache-2.0

Keywords

buffer

FAQs

Package last updated on 29 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.