Comparing version 0.9.4 to 0.9.5
14
index.js
@@ -65,12 +65,2 @@ /** | ||
function zeropad(msg) { | ||
var zeroes; | ||
if (msg.length < 32) { | ||
zeroes = new Buffer(32 - msg.length); | ||
zeroes.fill(0); | ||
msg = Buffer.concat([zeroes, msg]); | ||
} | ||
return msg; | ||
} | ||
/** | ||
@@ -87,3 +77,3 @@ * Create an ECDSA signature. | ||
assert(msg.length <= 32, "Message is too long"); | ||
resolve(secp256k1.sign(privateKey, zeropad(msg))); | ||
resolve(secp256k1.sign(privateKey, msg)); | ||
}); | ||
@@ -104,3 +94,3 @@ }; | ||
assert(msg.length <= 32, "Message is too long"); | ||
if (secp256k1.verify(publicKey, zeropad(msg), sig) === 1) { | ||
if (secp256k1.verify(publicKey, msg, sig) === 1) { | ||
resolve(); | ||
@@ -107,0 +97,0 @@ } else { |
{ | ||
"name": "eccrypto", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"description": "JavaScript Elliptic curve cryptography library", | ||
@@ -57,4 +57,4 @@ "main": "index.js", | ||
"optionalDependencies": { | ||
"secp256k1": "~0.0.13" | ||
"secp256k1": "~0.0.15" | ||
} | ||
} |
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
38221
518