| 程序包 | 说明 |
|---|---|
| network.nerve.core.crypto |
| 限定符和类型 | 方法和说明 |
|---|---|
static ECKey.ECDSASignature |
ECKey.ECDSASignature.decodeFromDER(byte[] bytes) |
ECKey.ECDSASignature |
ECKey.ECDSASignature.toCanonicalised()
Will automatically adjust the S component to be less than or equal to half the curve order, if necessary.
|
| 限定符和类型 | 方法和说明 |
|---|---|
byte |
ECKey.findRecoveryId(Sha256Hash hash,
ECKey.ECDSASignature sig)
Returns the recovery ID, a byte with value between 0 and 3, inclusive, that specifies which of 4 possible
curve points was used to sign a message.
|
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.
|
static boolean |
ECKey.verify(byte[] data,
ECKey.ECDSASignature signature,
byte[] pub)
Verifies the given ECDSA signature against the message bytes using the public key bytes.
|
boolean |
ECKey.verify(Sha256Hash sigHash,
ECKey.ECDSASignature signature)
Verifies the given R/S pair (signature) against a hash using the public key.
|
void |
ECKey.verifyOrThrow(Sha256Hash sigHash,
ECKey.ECDSASignature signature)
Verifies the given R/S pair (signature) against a hash using the public key, and throws an exception
if the signature doesn't match
|
Copyright © 2021. All rights reserved.