public class Sign
extends java.lang.Object
Transaction signing logic.
Adapted from the BitcoinJ ECKey implementation.
| Constructor and Description |
|---|
Sign() |
| Modifier and Type | Method and Description |
|---|---|
static java.math.BigInteger |
publicKeyFromPrivate(java.math.BigInteger privKey)
Returns public key from the given private key.
|
static java.math.BigInteger |
signedMessageToKey(byte[] message,
org.web3j.crypto.Sign.SignatureData signatureData)
Given an arbitrary piece of text and an Ethereum message signature encoded in bytes,
returns the public key that was used to sign it.
|
static org.web3j.crypto.Sign.SignatureData |
signMessage(byte[] message,
ECKeyPair keyPair) |
public static org.web3j.crypto.Sign.SignatureData signMessage(byte[] message,
ECKeyPair keyPair)
public static java.math.BigInteger signedMessageToKey(byte[] message,
org.web3j.crypto.Sign.SignatureData signatureData)
throws java.security.SignatureException
message - RLP encoded message.signatureData - The message signature componentsjava.security.SignatureException - If the public key could not be recovered or if there was a
signature format error.public static java.math.BigInteger publicKeyFromPrivate(java.math.BigInteger privKey)
privKey - the private key to derive the public key from