|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.crypto.DeterministicKey
public class DeterministicKey
A deterministic key is a node in a DeterministicHierarchy. As per
the BIP 32 specification it is a pair (key, chaincode). If you
know its path in the tree you can derive more keys from this.
| Method Summary | |
|---|---|
byte[] |
getChainCode()
Returns the chain code associated with this key. |
ChildNumber |
getChildNumber()
Returns the last element of the path returned by getChildNumberPath() |
com.google.common.collect.ImmutableList<ChildNumber> |
getChildNumberPath()
Returns the path through some DeterministicHierarchy which reaches this keys position in the tree. |
byte[] |
getFingerprint()
Returns the first 32 bits of the result of getIdentifier(). |
byte[] |
getIdentifier()
Returns RIPE-MD160(SHA256(pub key bytes)). |
DeterministicKey |
getParent()
|
String |
getPath()
Returns the path of this key as a human readable string starting with M to indicate the master key. |
BigInteger |
getPrivAsFieldElement()
|
byte[] |
getPrivKeyBytes()
Returns the private key bytes, if they were provided during construction. |
byte[] |
getPrivKeyBytes33()
|
byte[] |
getPubKeyBytes()
|
DeterministicKey |
getPubOnly()
Returns the same key with the private part removed. |
boolean |
hasPrivate()
|
byte[] |
serializePrivate()
|
String |
serializePrivB58()
|
String |
serializePubB58()
|
byte[] |
serializePublic()
|
ECKey |
toECKey()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public com.google.common.collect.ImmutableList<ChildNumber> getChildNumberPath()
DeterministicHierarchy which reaches this keys position in the tree.
A path can be written as 1/2/1 which means the first child of the root, the second child of that node, then
the first child of that node.
public ChildNumber getChildNumber()
getChildNumberPath()
public byte[] getChainCode()
public String getPath()
public byte[] getIdentifier()
public byte[] getPubKeyBytes()
public byte[] getFingerprint()
getIdentifier().
@Nullable public BigInteger getPrivAsFieldElement()
@Nullable public DeterministicKey getParent()
@Nullable public byte[] getPrivKeyBytes()
public byte[] getPrivKeyBytes33()
public DeterministicKey getPubOnly()
public boolean hasPrivate()
public ECKey toECKey()
public String serializePubB58()
public String serializePrivB58()
public byte[] serializePublic()
public byte[] serializePrivate()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||