ecdsa: add default checkSig, to be removed in 2.0.0
This commit is contained in:
parent
a492969ab2
commit
6938c8f8cc
2 changed files with 38 additions and 1 deletions
test
|
@ -27,6 +27,17 @@ describe('ecdsa', function() {
|
|||
})
|
||||
})
|
||||
|
||||
// FIXME: remove in 2.0.0
|
||||
fixtures.valid.ecdsa.forEach(function(f) {
|
||||
it('(deprecated) for \"' + f.message + '\"', function() {
|
||||
var d = BigInteger.fromHex(f.d)
|
||||
var h1 = crypto.sha256(f.message)
|
||||
|
||||
var k = ecdsa.deterministicGenerateK(curve, h1, d) // default checkSig
|
||||
assert.equal(k.toHex(), f.k)
|
||||
})
|
||||
})
|
||||
|
||||
it('loops until an appropriate k value is found', sinon.test(function() {
|
||||
this.mock(BigInteger).expects('fromBuffer')
|
||||
.exactly(3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue