Skip to content
Closed
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
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
sudo: false
language: node_js
node_js:
- "0.11"
- "0.12"
- "4"
- "5"
- "8"
- "10"
matrix:
include:
- node_js: "4"
- node_js: "10"
env: TEST_SUITE=lint
env:
- TEST_SUITE=unit
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"unit": "tape test/*.js"
},
"dependencies": {
"bn.js": "^4.11.0",
"bn.js": "^5.1.1",
"randombytes": "^2.0.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var tape = require('tape')
var crt = require('../')

require('./fixtures').forEach(function (fixture, i) {
var key = new Buffer(fixture, 'hex')
var key = Buffer.from(fixture, 'hex')
var priv = parseKey(key)

for (var j1 = 1; j1 < 31; ++j1) {
Expand All @@ -26,7 +26,7 @@ require('./fixtures').forEach(function (fixture, i) {
} while (r.cmp(priv.modulus) >= 0)
var buf = r.toArrayLike(Buffer, 'be')
if (buf.byteLength < priv.modulus.byteLength()) {
var tmp = new Buffer(priv.modulus.byteLength() - buf.byteLength)
var tmp = Buffer.alloc(priv.modulus.byteLength() - buf.byteLength)
tmp.fill(0)
buf = Buffer.concat([tmp, buf])
}
Expand Down