mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-30 19:41:24 +00:00
HDKeyDerivation: Make precondition message more clear in deriveChildKeyBytesFromPublic().
This commit is contained in:
@@ -186,7 +186,7 @@ public final class HDKeyDerivation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static RawKeyBytes deriveChildKeyBytesFromPublic(DeterministicKey parent, ChildNumber childNumber, PublicDeriveMode mode) throws HDDerivationException {
|
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);
|
byte[] parentPublicKey = parent.getPubKeyPoint().getEncoded(true);
|
||||||
checkState(parentPublicKey.length == 33, "Parent pubkey must be 33 bytes, but is " + parentPublicKey.length);
|
checkState(parentPublicKey.length == 33, "Parent pubkey must be 33 bytes, but is " + parentPublicKey.length);
|
||||||
ByteBuffer data = ByteBuffer.allocate(37);
|
ByteBuffer data = ByteBuffer.allocate(37);
|
||||||
|
Reference in New Issue
Block a user