Class DumpedPrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class DumpedPrivateKey
    extends PrefixedChecksummedBytes
    Parses and generates private keys in the form used by the Bitcoin "dumpprivkey" command. This is the private key bytes with a header byte and 4 checksum bytes at the end. If there are 33 private key bytes instead of 32, then the last byte is a discriminator value for the compressed pubkey.
    See Also:
    Serialized Form
    • Method Detail

      • toBase58

        public java.lang.String toBase58()
        Returns the base58-encoded textual form, including version and checksum bytes.
        Returns:
        textual form
      • getKey

        public ECKey getKey()
        Returns an ECKey created from this encoded private key.
      • isPubKeyCompressed

        public boolean isPubKeyCompressed()
        Returns true if the public key corresponding to this private key is compressed.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object