Socket
Socket
Sign inDemoInstall

zmq-zap

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

13

examples/curve.js

@@ -9,8 +9,9 @@ var zmq = require('zmq'),

// The clientPublicKey is also used for authentication
var serverPublicKey = z85.decode('E&ahzm6FilM:*[[7G1Df!cd$}(Z8}=K!>#QwNrnn'),
serverPrivateKey = z85.decode('a6*<Em>Zd^a4ENdsGp>MNZ8-PevbUblDfk(9NJA<'),
clientPublicKey = z85.decode('(kW)UE2vR%M^!mp9LPJ]3%[o?Y-344U?#LKW8m>('),
clientPrivateKey = z85.decode('Gzy#j=-mi{2iCF2vi]N?pketY7+cI*xc8YXRFjH1');
var serverKeypair = zmq.curveKeypair(),
clientKeypair = zmq.curveKeypair();
var serverPublicKey = serverKeypair.public,
serverPrivateKey = serverKeypair.secret,
clientPublicKey = clientKeypair.public,
clientPrivateKey = clientKeypair.secret;
// Requires for ZAP handler

@@ -34,3 +35,3 @@ var zmqzap = require('../'),

// and where the publickey matches the one we have for the client
if (data.publickey == '(kW)UE2vR%M^!mp9LPJ]3%[o?Y-344U?#LKW8m>(') callback(null, true);
if (data.publickey == clientPublicKey) callback(null, true);
else callback(null, false);

@@ -37,0 +38,0 @@ }

@@ -54,2 +54,4 @@ # Examples

See the source code in the file below for an example of how to generate CurveZMQ keypairs.
[curve.js](curve.js)
{
"name": "zmq-zap",
"version": "0.0.2",
"version": "0.0.3",
"description": "ZeroMQ Authentication Protocol",

@@ -37,4 +37,4 @@ "main": "index.js",

"z85": "~0.0.1",
"debug": "~0.7.4"
"debug": "~3.1.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc