public class Keys extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ADDRESS_LENGTH_IN_HEX |
static int |
ADDRESS_SIZE |
static int |
PRIVATE_KEY_LENGTH_IN_HEX |
| 限定符和类型 | 方法和说明 |
|---|---|
static ECKeyPair |
createEcKeyPair() |
static ECKeyPair |
createEcKeyPair(SecureRandom random) |
static ECKeyPair |
deserialize(byte[] input) |
static String |
getAddress(BigInteger publicKey) |
static byte[] |
getAddress(byte[] publicKey) |
static String |
getAddress(ECKeyPair ecKeyPair) |
static String |
getAddress(String publicKey) |
static byte[] |
serialize(ECKeyPair ecKeyPair) |
static String |
toChecksumAddress(String address)
Checksum address encoding as per EIP-55.
|
public static final int ADDRESS_SIZE
public static final int ADDRESS_LENGTH_IN_HEX
public static final int PRIVATE_KEY_LENGTH_IN_HEX
public static ECKeyPair createEcKeyPair() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException
public static ECKeyPair createEcKeyPair(SecureRandom random) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException
public static String getAddress(BigInteger publicKey)
public static byte[] getAddress(byte[] publicKey)
public static String toChecksumAddress(String address)
address - a valid hex encoded addresspublic static byte[] serialize(ECKeyPair ecKeyPair)
public static ECKeyPair deserialize(byte[] input)
Copyright © 2021. All rights reserved.