From 5f88cb89318d92884c7f2203b1088b70988f13d8 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 31 May 2014 11:24:00 +1000 Subject: [PATCH] ECKey: use signum over compareTo --- src/eckey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eckey.js b/src/eckey.js index 170b9dc..4d9f9e3 100644 --- a/src/eckey.js +++ b/src/eckey.js @@ -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)