Class ECKeyPair

java.lang.Object
org.web3j.crypto.ECKeyPair
Direct Known Subclasses:
Bip32ECKeyPair

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

  • Method Details

    • getPrivateKey

      public BigInteger getPrivateKey()
    • getPublicKey

      public 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(KeyPair keyPair)
    • create

      public static ECKeyPair create(BigInteger privateKey)
    • create

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object