Let ECKeys be constructed from ECKeys

This commit is contained in:
vub 2013-10-08 07:52:48 -04:00
parent 117ecd1e29
commit 7684c3f705
2 changed files with 5 additions and 3 deletions

6
bitcoinjs-min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -21,6 +21,8 @@ var ECKey = function (input) {
// Generate new key // Generate new key
var n = ecparams.getN(); var n = ecparams.getN();
this.priv = ecdsa.getBigRandom(n); this.priv = ecdsa.getBigRandom(n);
} else if (input instanceof ECKey) {
this.priv = input.priv;
} else if (input instanceof BigInteger) { } else if (input instanceof BigInteger) {
// Input is a private key value // Input is a private key value
this.priv = input; this.priv = input;