ECKey: use signum over compareTo
This commit is contained in:
parent
978f0c5406
commit
5f88cb8931
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ var sec = require('./sec')
|
|||
var ecparams = sec('secp256k1')
|
||||
|
||||
function ECKey(D, compressed) {
|
||||
assert(D.compareTo(BigInteger.ZERO) > 0, 'Private key must be greater than 0')
|
||||
assert(D.signum() > 0, 'Private key must be greater than 0')
|
||||
assert(D.compareTo(ecparams.getN()) < 0, 'Private key must be less than the curve order')
|
||||
|
||||
var Q = ecparams.getG().multiply(D)
|
||||
|
|
Loading…
Reference in a new issue