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

curvecp

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curvecp - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

2

package.json
{
"name": "curvecp",
"version": "0.9.2",
"version": "0.9.3",
"description": "Pure javascript CurveCP library",

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

@@ -11,2 +11,3 @@ 'use strict'

nacl.util = require('tweetnacl-util')
var utils = require('./utils.js')

@@ -19,2 +20,4 @@ var HELLO_MSG = nacl.util.decodeUTF8('QvnQ5XlH')

var HELLO_WAIT = [1000000000, 1500000000, 2250000000, 3375000000, 5062500000, 7593750000, 11390625000, 17085937500]
nacl.setPRNG(function (x, n) {

@@ -35,2 +38,3 @@ var i

this.__remoteNonceCounter = 0
this.__helloCounter = 0
this.__state = null

@@ -374,2 +378,3 @@ Duplex.call(this, opts)

debug('sendHello')
var self = this
this._setCanSend(false)

@@ -388,2 +393,11 @@ this.__initiateSend = false

this.stream.write(new Buffer(result))
var wait = HELLO_WAIT[this.__helloCounter]
setTimeout(function () {
if (self.__state === COOKIE_MSG || self.__state === SERVER_MSG) {} else if (self.__helloCounter < HELLO_WAIT.length + 1) {
self.__helloCounter += 1
self._sendHello()
} else {
self.emit('error', new Error('Maximum resends of HELLO packet reached, aborting'))
}
}, (wait + utils.randommod(wait)) / 1000000)
}

@@ -390,0 +404,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