git ssb

3+

cel / ssb-npm-registry



Tree: 1f9a3fcaa6f6fa4a3ad0a219f6df1a476588f6d5

Files: 1f9a3fcaa6f6fa4a3ad0a219f6df1a476588f6d5 / node_modules / pull-hash / README.md

1452 bytesRaw

pull-hash

crypto hash API using pull-streams

var hash = require('pull-hash')
var pull = require('pull-stream')

pull(
  source,
  hash('sha256', 'hex', function (err, sum) {
    console.log('shasum:', sum)
  }),
  pull.drain()
)

API

var hash = require('pull-hash')

hash(type[, encoding], onEnd): through

Create a through stream that hashes the data and calls onEnd when it is done.

Extras

var gitHash = require('pull-hash/ext/git')

gitHash(object[, encoding], onEnd): through

Get a git object id.

var ssbHash = require('pull-hash/ext/ssb')

ssbHash(onEnd): through

Get a hash id of a secure-scuttlebutt blob.

License

Copyright (c) 2016-2018 cel

Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

Built with git-ssb-web