| 程序包 | 说明 |
|---|---|
| network.nerve.base.signture | |
| network.nerve.core.crypto | |
| network.nerve.kit.model | |
| network.nerve.kit.util |
| 限定符和类型 | 方法和说明 |
|---|---|
static P2PHKSignature |
SignatureUtil.createSignatureByEckey(NulsHash hash,
ECKey ecKey) |
static P2PHKSignature |
SignatureUtil.createSignatureByEckey(Transaction tx,
ECKey ecKey)
生成交易的签名传统
|
static NulsSignData |
SignatureUtil.signDigest(byte[] digest,
ECKey ecKey)
生成交易签名
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
SignatureUtil.createOrAddTransactionSignture(Transaction tx,
List<ECKey> signEckeys)
签名或者追加签名
|
static List<P2PHKSignature> |
SignatureUtil.createSignaturesByEckey(NulsHash hash,
List<ECKey> eckeys) |
static List<P2PHKSignature> |
SignatureUtil.createSignaturesByEckey(Transaction tx,
List<ECKey> eckeys)
生成交易多个传统签名(多地址转账可能会用到)
|
static void |
SignatureUtil.createTransactionSignture(Transaction tx,
List<ECKey> signEckeys)
生成交易TransactionSignture
|
| 限定符和类型 | 字段和说明 |
|---|---|
static Comparator<ECKey> |
ECKey.AGE_COMPARATOR
Sorts oldest keys first, newest last.
|
static Comparator<ECKey> |
ECKey.PUBKEY_COMPARATOR
Compares pub key bytes using
UnsignedBytes.lexicographicalComparator() |
| 限定符和类型 | 方法和说明 |
|---|---|
ECKey |
ECKey.decompress()
Returns a copy of this key, but with the public point represented in uncompressed form.
|
static ECKey |
ECKey.fromASN1(byte[] asn1privkey)
Construct an ECKey from an ASN.1 encoded private key.
|
static ECKey |
ECKey.fromEncrypted(EncryptedData encryptedPrivateKey,
byte[] pubKey)
根据EncryptedData和公钥生成ECKey
|
static ECKey |
ECKey.fromPrivate(BigInteger privKey)
Creates an ECKey given the private key only.
|
static ECKey |
ECKey.fromPrivate(BigInteger privKey,
boolean compressed)
Creates an ECKey given the private key only.
|
static ECKey |
ECKey.fromPrivate(byte[] privKeyBytes)
Creates an ECKey given the private key only.
|
static ECKey |
ECKey.fromPrivate(byte[] privKeyBytes,
boolean compressed)
Creates an ECKey given the private key only.
|
static ECKey |
ECKey.fromPrivateAndPrecalculatedPublic(BigInteger priv,
org.bouncycastle.math.ec.ECPoint pub)
Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the
generator point by the private key.
|
static ECKey |
ECKey.fromPrivateAndPrecalculatedPublic(byte[] priv,
byte[] pub)
Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the
generator point by the private key.
|
static ECKey |
ECKey.fromPublicOnly(byte[] pub)
Creates an ECKey that cannot be used for signing, only verifying signatures, from the given encoded point.
|
static ECKey |
ECKey.fromPublicOnly(org.bouncycastle.math.ec.ECPoint pub)
Creates an ECKey that cannot be used for signing, only verifying signatures, from the given point.
|
static ECKey |
ECKey.recoverFromSignature(int recId,
ECKey.ECDSASignature sig,
Sha256Hash message,
boolean compressed)
Given the components of a signature and a selector value, recover and return the public key
that generated the signature according to the algorithm in SEC1v2 section 4.1.6.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ECKey |
Account.getEcKey() |
ECKey |
Account.getEcKey(String password)
根据密码获取ECKey
|
ECKey |
Account.getEcKey1(String password) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Account.setEcKey(ECKey ecKey) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Address |
AccountTool.newAddress(int chainId,
ECKey key) |
Copyright © 2021. All rights reserved.