public class Sign
extends java.lang.Object
Transaction signing logic.
Adapted from the BitcoinJ ECKey implementation.
| Modifier and Type | Class and Description |
|---|---|
static class |
Sign.SignatureData |
| 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,
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 Sign.SignatureData |
signMessage(byte[] message,
ECKeyPair keyPair) |
public static Sign.SignatureData signMessage(byte[] message, ECKeyPair keyPair)
public static java.math.BigInteger signedMessageToKey(byte[] message,
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