类 ECKeyPair
java.lang.Object
org.nervos.ckb.crypto.secp256k1.ECKeyPair
public class ECKeyPair
extends java.lang.Object
-
构造器概要
构造器 构造器 说明 ECKeyPair(java.math.BigInteger privateKey, java.math.BigInteger publicKey) -
方法概要
修饰符和类型 方法 说明 static ECKeyPaircreateWithKeyPair(java.security.KeyPair keyPair)static ECKeyPaircreateWithPrivateKey(byte[] privateKey)static ECKeyPaircreateWithPrivateKey(java.lang.String privateKeyHex, boolean compressed)static ECKeyPaircreateWithPrivateKey(java.math.BigInteger privateKey)static ECKeyPaircreateWithPrivateKey(java.math.BigInteger privateKey, boolean compressed)booleanequals(java.lang.Object o)java.math.BigIntegergetPrivateKey()java.math.BigIntegergetPublicKey()inthashCode()static java.lang.StringpublicKeyFromPrivate(java.lang.String privateKeyHex)static java.math.BigIntegerpublicKeyFromPrivate(java.math.BigInteger privateKey)Returns public key from the given private key.static java.math.BigIntegerpublicKeyFromPrivate(java.math.BigInteger privateKey, boolean compressed)Returns public key from the given private key.
-
构造器详细资料
-
ECKeyPair
public ECKeyPair(java.math.BigInteger privateKey, java.math.BigInteger publicKey)
-
-
方法详细资料
-
getPrivateKey
public java.math.BigInteger getPrivateKey() -
getPublicKey
public java.math.BigInteger getPublicKey() -
createWithKeyPair
-
createWithPrivateKey
-
createWithPrivateKey
-
createWithPrivateKey
-
createWithPrivateKey
-
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
-