类 ECKeyPair

java.lang.Object
org.nervos.ckb.crypto.secp256k1.ECKeyPair

public class ECKeyPair
extends java.lang.Object
  • 构造器详细资料

    • ECKeyPair

      public ECKeyPair​(java.math.BigInteger privateKey, java.math.BigInteger publicKey)
  • 方法详细资料

    • getPrivateKey

      public java.math.BigInteger getPrivateKey()
    • getPublicKey

      public java.math.BigInteger getPublicKey()
    • createWithKeyPair

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

      public static ECKeyPair createWithPrivateKey​(java.math.BigInteger privateKey, boolean compressed)
    • createWithPrivateKey

      public static ECKeyPair createWithPrivateKey​(java.lang.String privateKeyHex, boolean compressed)
    • createWithPrivateKey

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

      public static ECKeyPair createWithPrivateKey​(byte[] privateKey)
    • publicKeyFromPrivate

      public static java.math.BigInteger publicKeyFromPrivate​(java.math.BigInteger privateKey)
      Returns public key from the given private key.
      参数:
      privateKey - the private key to derive the public key from
      返回:
      BigInteger encoded public key
    • publicKeyFromPrivate

      public static java.lang.String publicKeyFromPrivate​(java.lang.String privateKeyHex)
    • publicKeyFromPrivate

      public static java.math.BigInteger publicKeyFromPrivate​(java.math.BigInteger privateKey, boolean compressed)
      Returns public key from the given private key.
      参数:
      privateKey - the private key to derive the public key from
      返回:
      BigInteger encoded public key
    • equals

      public boolean equals​(java.lang.Object o)
      覆盖:
      equals 在类中 java.lang.Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 java.lang.Object