bigi: upgrade to 1.1.0
This commit is contained in:
parent
1087ac07de
commit
cd326921bc
2 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@
|
||||||
"compile": "./node_modules/.bin/browserify ./src/index.js -s Bitcoin | ./node_modules/.bin/uglifyjs > bitcoinjs-min.js"
|
"compile": "./node_modules/.bin/browserify ./src/index.js -s Bitcoin | ./node_modules/.bin/uglifyjs > bitcoinjs-min.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bigi": "1.0.0",
|
"bigi": "1.1.0",
|
||||||
"crypto-js": "3.1.2-3",
|
"crypto-js": "3.1.2-3",
|
||||||
"secure-random": "0.2.1"
|
"secure-random": "0.2.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,8 +88,8 @@ function verifyRaw(ecparams, e, r, s, Q) {
|
||||||
* Takes two BigIntegers representing r and s and returns a byte array.
|
* Takes two BigIntegers representing r and s and returns a byte array.
|
||||||
*/
|
*/
|
||||||
function serializeSig(r, s) {
|
function serializeSig(r, s) {
|
||||||
var rBa = r.toByteArraySigned()
|
var rBa = r.toDERInteger()
|
||||||
var sBa = s.toByteArraySigned()
|
var sBa = s.toDERInteger()
|
||||||
|
|
||||||
var sequence = []
|
var sequence = []
|
||||||
sequence.push(0x02); // INTEGER
|
sequence.push(0x02); // INTEGER
|
||||||
|
@ -130,8 +130,8 @@ function parseSig(buffer) {
|
||||||
var sB = buffer.slice(2 + offset)
|
var sB = buffer.slice(2 + offset)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
r: BigInteger.fromByteArraySigned(rB),
|
r: BigInteger.fromDERInteger(rB),
|
||||||
s: BigInteger.fromByteArraySigned(sB)
|
s: BigInteger.fromDERInteger(sB)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue