npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

hyperswarm-capability

1.0.3

@mafintosh

npmHomeRepoSnykSocket
Downloads:5407
$ npm install hyperswarm-capability
DailyWeeklyMonthlyYearly

hyperswarm-capability

Produce a stream coupled capability for a key

npm install hyperswarm-capability

Usage

const HyperswarmCapability = require('hyperswarm-capability')

const c = new HyperswarmCapability()
const key = Buffer.from('the key you want to use a shared secret')

const cap = c.generate(stream, key)

// send to other person

if (otherC.verify(stream, key, cap)) {
  // ok the stream has proven they know the key
}

License

Apache-2.0