Package | Description |
---|---|
org.tron.common.crypto |
Modifier and Type | Method and Description |
---|---|
static ECKey.ECDSASignature |
ECKey.ECDSASignature.decodeFromDER(byte[] bytes) |
ECKey.ECDSASignature |
ECKey.doSign(byte[] input)
Signs the given hash and returns the R and S components as BigIntegers and putData them in
ECDSASignature
|
static ECKey.ECDSASignature |
ECKey.ECDSASignature.fromComponents(byte[] r,
byte[] s,
byte v) |
ECKey.ECDSASignature |
ECKey.sign(byte[] messageHash)
Takes the keccak hash (32 bytes) of data and returns the ECDSA signature
|
ECKey.ECDSASignature |
ECKey.ECDSASignature.toCanonicalised() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
ECKey.recoverAddressFromSignature(int recId,
ECKey.ECDSASignature sig,
byte[] messageHash) |
static ECKey |
ECKey.recoverFromSignature(int recId,
ECKey.ECDSASignature sig,
byte[] messageHash) |
static byte[] |
ECKey.recoverPubBytesFromSignature(int recId,
ECKey.ECDSASignature sig,
byte[] messageHash)
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 byte[] |
ECKey.signatureToAddress(byte[] messageHash,
ECKey.ECDSASignature sig)
Compute the address of the key that signed the given signature.
|
static ECKey |
ECKey.signatureToKey(byte[] messageHash,
ECKey.ECDSASignature sig)
Compute the key that signed the given signature.
|
static byte[] |
ECKey.signatureToKeyBytes(byte[] messageHash,
ECKey.ECDSASignature sig) |
boolean |
ECKey.verify(byte[] sigHash,
ECKey.ECDSASignature signature)
Verifies the given R/S pair (signature) against a hash using the public key.
|
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.
|
Copyright © 2020. All rights reserved.