add private key support to eckey #2

This commit is contained in:
Craig Raw 2020-04-20 16:30:40 +02:00
parent 06b46e0a02
commit 7d69fafc3e

View file

@ -28,7 +28,7 @@ public class DeterministicKey extends ECKey {
LazyECPoint publicAsPoint, LazyECPoint publicAsPoint,
int depth, int depth,
byte[] parentFingerprint) { byte[] parentFingerprint) {
super(compressPoint(publicAsPoint)); super(null, compressPoint(publicAsPoint));
if(chainCode.length != 32) { if(chainCode.length != 32) {
throw new IllegalArgumentException("Chaincode not 32 bytes in length"); throw new IllegalArgumentException("Chaincode not 32 bytes in length");
} }
@ -43,7 +43,7 @@ public class DeterministicKey extends ECKey {
byte[] chainCode, byte[] chainCode,
LazyECPoint publicAsPoint, LazyECPoint publicAsPoint,
DeterministicKey parent) { DeterministicKey parent) {
super(compressPoint(publicAsPoint)); super(null, compressPoint(publicAsPoint));
if(chainCode.length != 32) { if(chainCode.length != 32) {
throw new IllegalArgumentException("Chaincode not 32 bytes in length"); throw new IllegalArgumentException("Chaincode not 32 bytes in length");
} }