Skip to content

Commit

Permalink
[Fix] use safe-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Libert authored and ljharb committed Dec 6, 2023
1 parent 50464d7 commit 28d2560
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

var BN = require('bn.js');
var randomBytes = require('randombytes');
var Buffer = require('safe-buffer').Buffer;

function getr(priv) {
var len = priv.modulus.byteLength();
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
},
"dependencies": {
"bn.js": "^5.2.1",
"randombytes": "^2.1.0"
"randombytes": "^2.1.0",
"safe-buffer": "^5.2.1"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
Expand Down
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var crypto = require('crypto');
var constants = require('constants');
var parseKey = require('parse-asn1');
var BN = require('bn.js');
var Buffer = require('safe-buffer').Buffer;
var test = require('tape');

var crt = require('../');

var fixtures = require('./fixtures');
Expand Down

0 comments on commit 28d2560

Please sign in to comment.