From 429e807994cac418237d28952373c5989a3877b4 Mon Sep 17 00:00:00 2001 From: nanov Date: Wed, 6 Nov 2019 17:27:48 +0200 Subject: [PATCH] fix number generarion --- lib/BigNumber.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/BigNumber.js b/lib/BigNumber.js index f53ce28..c8f3be9 100644 --- a/lib/BigNumber.js +++ b/lib/BigNumber.js @@ -4,7 +4,8 @@ const { jsbn: { BigInteger } } = require('node-forge'); class BigNumber { constructor(value = '') { - this._n = new BigInteger(value); + this._n = new BigInteger(null); + this._n.fromInt(value); } toBEBuffer(length = undefined) {