Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bittorrent-dht-store-keypair

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bittorrent-dht-store-keypair - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

3

index.js

@@ -37,6 +37,7 @@ var ed = require('ed25519-supercop')

if (opts.seq === undefined) this.seq ++
var salt = typeof opts.salt === 'string' ? Buffer(opts.salt) : opts.salt
return {
k: this.publicKey,
seq: seq,
salt: opts.salt,
salt: salt,
v: value,

@@ -43,0 +44,0 @@ sign: function (buf) {

{
"name": "bittorrent-dht-store-keypair",
"version": "3.0.0",
"version": "3.0.1",
"description": "create and load signing keys for bittorrent-dht dht_store",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,4 +16,4 @@ var test = require('tape')

var docs = [
{ value: 'wow', salt: 'doge' },
{ value: 'beep', salt: 'robot' }
{ data: 'wow', salt: 'doge' },
{ data: 'beep', salt: 'robot' }
]

@@ -23,11 +23,11 @@ var hashes = {}

dht1.addNode('127.0.0.1:' + dht0._port)
dht1.once('node', upload)
dht1.once('node', function () { upload(0) })
})
function upload () {
if (docs.shift === 0) return check()
var doc = docs.shift()
function upload (i) {
if (i >= docs.length) return check()
var doc = docs[i]
dht0.put(kp0.store(doc.data, doc), function (errors, hash) {
errors.forEach(t.error)
hashes[doc.data] = hash
upload()
upload(i + 1)
})

@@ -34,0 +34,0 @@ }

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