Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
901K
increased by1.12%
Maintainers
1
Weekly downloads
 
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

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc