Comparing version 2.0.2 to 3.0.1
@@ -137,3 +137,3 @@ var bn = require('bn.js'); | ||
return new Signature(r, s); | ||
return new Signature({ r: r, s: s }); | ||
} while (true); | ||
@@ -140,0 +140,0 @@ }; |
@@ -7,12 +7,12 @@ var bn = require('bn.js'); | ||
function Signature(r, s) { | ||
if (r instanceof Signature) | ||
return r; | ||
function Signature(options, enc) { | ||
if (options instanceof Signature) | ||
return options; | ||
if (this._importDER(r, s)) | ||
if (this._importDER(options, enc)) | ||
return; | ||
assert(r && s, 'Signature without r or s'); | ||
this.r = new bn(r, 16); | ||
this.s = new bn(s, 16); | ||
assert(options.r && options.s, 'Signature without r or s'); | ||
this.r = new bn(options.r, 16); | ||
this.s = new bn(options.s, 16); | ||
} | ||
@@ -19,0 +19,0 @@ module.exports = Signature; |
{ | ||
"name": "elliptic", | ||
"version": "2.0.2", | ||
"version": "3.0.1", | ||
"description": "EC cryptography", | ||
@@ -31,3 +31,3 @@ "main": "lib/elliptic.js", | ||
"dependencies": { | ||
"bn.js": "^1.2.4", | ||
"bn.js": "^2.0.0", | ||
"brorand": "^1.0.1", | ||
@@ -34,0 +34,0 @@ "hash.js": "^1.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137719
+ Addedbn.js@2.2.0(transitive)
- Removedbn.js@1.3.0(transitive)
Updatedbn.js@^2.0.0