类 Sign

java.lang.Object
org.nervos.ckb.crypto.secp256k1.Sign

public class Sign
extends java.lang.Object
  • 嵌套类概要

    嵌套类 
    修饰符和类型 说明
    static class  Sign.SignatureData  
  • 字段概要

    字段 
    修饰符和类型 字段 说明
    static int SIGN_LENGTH  
  • 构造器概要

    构造器 
    构造器 说明
    Sign()  
  • 方法概要

    修饰符和类型 方法 说明
    static java.math.BigInteger signedMessageToKey​(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.SignatureData signMessage​(byte[] message, ECKeyPair keyPair)  
    static Sign.SignatureData signMessage​(byte[] message, ECKeyPair keyPair, boolean isHash)  

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

  • 构造器详细资料

    • Sign

      public Sign()
  • 方法详细资料

    • signMessage

      public static Sign.SignatureData signMessage​(byte[] message, ECKeyPair keyPair)
    • signMessage

      public static Sign.SignatureData signMessage​(byte[] message, ECKeyPair keyPair, boolean isHash)
    • signedMessageToKey

      public static java.math.BigInteger signedMessageToKey​(byte[] message, Sign.SignatureData signatureData) throws java.security.SignatureException
      Given 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.