类 Sign
java.lang.Object
org.nervos.ckb.crypto.secp256k1.Sign
public class Sign
extends java.lang.Object
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classSign.SignatureData -
字段概要
字段 修饰符和类型 字段 说明 static intSIGN_LENGTH -
构造器概要
构造器 构造器 说明 Sign() -
方法概要
修饰符和类型 方法 说明 static java.math.BigIntegersignedMessageToKey(byte[] message, Sign.SignatureData signatureData)Given an arbitrary piece of text and an message signature encoded in bytes, returns the public key that was used to sign it.static Sign.SignatureDatasignMessage(byte[] message, ECKeyPair keyPair)static Sign.SignatureDatasignMessage(byte[] message, ECKeyPair keyPair, boolean isHash)
-
字段详细资料
-
SIGN_LENGTH
public static final int SIGN_LENGTH- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
Sign
public Sign()
-
-
方法详细资料
-
signMessage
-
signMessage
-
signedMessageToKey
public static java.math.BigInteger signedMessageToKey(byte[] message, Sign.SignatureData signatureData) throws java.security.SignatureExceptionGiven an arbitrary piece of text and an message signature encoded in bytes, returns the public key that was used to sign it. This can then be compared to the expected public key to determine if the signature was correct.- 参数:
message- RLP encoded message.signatureData- The message signature components- 返回:
- the public key used to sign the message
- 抛出:
java.security.SignatureException- If the public key could not be recovered or if there was a signature formatTx error.
-