Class PrivateKey


  • public class PrivateKey
    extends Object
    A private key on a secp256k1 elliptic curve
    • Constructor Detail

      • PrivateKey

        public PrivateKey​(Int secret)

        Constructor for PrivateKey.

        Parameters:
        secret - a Int object
    • Method Detail

      • parse

        public static PrivateKey parse​(byte[] secret)
        parse
        Parameters:
        secret - .
        Returns:
        .
      • deterministicK

        public Int deterministicK​(Int z)

        deterministicK.

        Parameters:
        z - a Int object
        Returns:
        a Int object
      • wif

        public String wif​(boolean compressed,
                          boolean testnet)

        wif.

        Parameters:
        compressed - a boolean
        testnet - a boolean
        Returns:
        a String object
      • parseWif

        public static PrivateKey parseWif​(String wif,
                                          boolean compressed,
                                          boolean testnet)
        parseWif
        Parameters:
        wif - .
        compressed - .
        testnet - .
        Returns:
        .
      • getPoint

        public S256Point getPoint()

        Get the point (public key)

        Returns:
        a S256Point object
      • getSecret

        public Int getSecret()
        Get the secret
        Returns:
        .