mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-15 11:45:51 +00:00
HDKeyDerivation: Make precondition message more clear in deriveChildKeyBytesFromPublic().
This commit is contained in:
parent
4283d58c23
commit
7197534485
@ -186,7 +186,7 @@ public final class HDKeyDerivation {
|
||||
}
|
||||
|
||||
public static RawKeyBytes deriveChildKeyBytesFromPublic(DeterministicKey parent, ChildNumber childNumber, PublicDeriveMode mode) throws HDDerivationException {
|
||||
checkArgument(!childNumber.isHardened(), "Can't use private derivation with public keys only.");
|
||||
checkArgument(!childNumber.isHardened(), "Hardened derivation is unsupported (%s).", childNumber);
|
||||
byte[] parentPublicKey = parent.getPubKeyPoint().getEncoded(true);
|
||||
checkState(parentPublicKey.length == 33, "Parent pubkey must be 33 bytes, but is " + parentPublicKey.length);
|
||||
ByteBuffer data = ByteBuffer.allocate(37);
|
||||
|
Loading…
x
Reference in New Issue
Block a user