New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blake2b-stream

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

blake2b-stream

Node Stream wrapper for Blake2b

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

blake2b-stream

Build Status

Node Stream wrapper for Blake2b

Usage

var blakeb2Stream = require('blake2b-stream')

process.stdin.pipe(blake2bStream(function (err, hash) {
  if (err) throw err

  console.log('b2sum:', hash.toString('hex'))
}))

API

var stream = blakeb2Stream([opts], cb(err, hash))

Create a stream that calculates the Blake2b hash when .end()ed. opts include opts.outputLength for the byte length of the hash and opts.key if you want to partition your hash space with a custom key. opts.key must be buffer. The allowed ranges for either argument can be referenced by the constants below. When the source stream ends cb will be called with a Buffer of length opts.outputLenght (which defaults to blake2bStream.BYTES / 32 bytes)

Constants

  • blake2bStream.BYTES Default hash length
  • blake2bStream.BYTES_MIN Min hash length
  • blake2bStream.BYTES_MAX Max hash length
  • blake2bStream.KEYBYTES Recommended key length
  • blake2bStream.KEYBYTES_MIN Min key length
  • blake2bStream.KEYBYTES_MAX Max key length

Install

npm install blake2b-stream

License

ISC

Keywords

FAQs

Package last updated on 25 Oct 2017

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