Class ECKeyPair

  • Direct Known Subclasses:
    Bip32ECKeyPair

    public class ECKeyPair
    extends java.lang.Object
    Elliptic Curve SECP-256k1 generated key pair.
    • Constructor Detail

      • ECKeyPair

        public ECKeyPair​(java.math.BigInteger privateKey,
                         java.math.BigInteger publicKey)
    • Method Detail

      • getPrivateKey

        public java.math.BigInteger getPrivateKey()
      • getPublicKey

        public java.math.BigInteger getPublicKey()
      • sign

        public ECDSASignature sign​(byte[] transactionHash)
        Sign a hash with the private key of this key pair.
        Parameters:
        transactionHash - the hash to sign
        Returns:
        An ECDSASignature of the hash
      • create

        public static ECKeyPair create​(java.security.KeyPair keyPair)
      • create

        public static ECKeyPair create​(java.math.BigInteger privateKey)
      • create

        public static ECKeyPair create​(byte[] privateKey)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object