Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Kevin Kwok <kkwok@mit.edu>
Min RK <benjaminrk@gmail.com>
Nicolas Riesco <enquiries@nicolasriesco.net>
Will Whitney <wfwhitney@gmail.com>
Maurício Szabo <mauricio.szabo@gmail.com>
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ Message.prototype._encode = function(scheme, key) {
if (key) {
var hmac = crypto.createHmac(scheme, key);
var encoding = "utf8";
hmac.update(new Buffer(header, encoding));
hmac.update(new Buffer(parent_header, encoding));
hmac.update(new Buffer(metadata, encoding));
hmac.update(new Buffer(content, encoding));
hmac.update(new Buffer.from(header, encoding));
hmac.update(new Buffer.from(parent_header, encoding));
hmac.update(new Buffer.from(metadata, encoding));
hmac.update(new Buffer.from(content, encoding));
signature = hmac.digest("hex");
}

Expand Down Expand Up @@ -451,4 +451,4 @@ module.exports = {
* ZeroMQ bindings
*/
zmq: zmq,
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"deasync": "0.1",
"uuid": "3",
"zeromq": "6.0.0-beta.6"
"zeromq": "6.0.0-beta.19"
},
"engines": {
"node": ">=10.12"
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe("Listeners", function() {
// Assign identity to client socket (only for testing purposes)
context.clientSocket.setsockopt(
zmq.ZMQ_IDENTITY,
new Buffer(uuid(), "ascii")
new Buffer.from(uuid(), "ascii")
);

// Bind to a random local port
Expand Down Expand Up @@ -248,7 +248,7 @@ describe("JMP messages", function() {
// Assign identity to client socket (only for testing purposes)
context.clientSocket.setsockopt(
zmq.ZMQ_IDENTITY,
new Buffer(uuid(), "ascii")
new Buffer.from(uuid(), "ascii")
);

// Bind to a random local port
Expand All @@ -271,7 +271,7 @@ describe("JMP messages", function() {

// The maximum length of a JS string in V8 is 0x1fffffe8 (536870888)
// See issue #35676 https://github.com/nodejs/node/issues/35676
messageFrames.unshift(new Buffer(512 * 1024 * 1024));
messageFrames.unshift(new Buffer.alloc(512 * 1024 * 1024));

jmp.Message._decode(
messageFrames, context.scheme, context.key
Expand Down