com.foxit.gsdk.pdf.signature

Class SignatureHandler

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.lang.Object clientData
      User-defined data.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SignatureHandler() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      abstract void continueCalcDigest(java.lang.Object clientData, java.lang.Object context, int millisecond)
      Foxit PDF SDK calls this interface to continue a custom digest calculation.
      abstract java.lang.String finishCalcDigest(java.lang.Object clientData, java.lang.Object context)
      Foxit PDF SDK calls this interface to finish the custom digest calculation and get the digest.
      abstract java.lang.String sign(java.lang.Object clientData, java.lang.Object context, Signature sigField, java.lang.String digest)
      Foxit PDF SDK calls this interface to sign a document.
      abstract java.lang.Object startCalcDigest(java.lang.Object clientData, Signature sigField, FileHandler file, int[] byteRange)
      Foxit PDF SDK calls this interface to start a custom digest calculation.
      abstract void verify(java.lang.Object clientData, java.lang.Object context, Signature sigField, java.lang.String digest, java.lang.String signedData)
      Foxit PDF SDK calls this interface to verify a specified signature.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • clientData

        public java.lang.Object clientData
        User-defined data. Caller can use this field to track controls.
    • Constructor Detail

      • SignatureHandler

        public SignatureHandler()
    • Method Detail

      • startCalcDigest

        public abstract java.lang.Object startCalcDigest(java.lang.Object clientData,
                                       Signature sigField,
                                       FileHandler file,
                                       int[] byteRange)
                                                  throws PDFException
        Foxit PDF SDK calls this interface to start a custom digest calculation.

        It may spend a long time for application to calculate the digest, so Foxit PDF SDK uses a progressive process to do this.
        The context returned to Foxit SDK will be used to track application to progressive process digest calculating steps by continueCalcDigest(Object, Object, int).

        Parameters:
        clientData - The user-supplied data.
        sigField - The Signature object that to be signed or verified.
        file - FileHandler object indicates the source file. When signing a signature, it's the source file object to be signed.
        When verifying a signature field, it's the source file object to be verified.
        byteRange - Byte range array.Elements in this array always be in pairs of offset-size values in order of : offset,size,offset,size...
        Returns:
        A custom digest calculate context object for Foxit SDK to continue calculate the digest.
        Throws:
        PDFException - For more exception information please see definitions PDFException.ERRCODE_XXX .
        See Also:
        PDFException, Signature, FileHandler
      • continueCalcDigest

        public abstract void continueCalcDigest(java.lang.Object clientData,
                              java.lang.Object context,
                              int millisecond)
                                         throws PDFException
        Foxit PDF SDK calls this interface to continue a custom digest calculation.
        Parameters:
        clientData - The user-supplied data.
        context - The digest calculate context object, returned by startCalcDigest(Object, Signature, FileHandler, int[]).
        millisecond - An integer value which represents millisecond, used to determine break state. This value would be non-negative. If it's 0, it means the calculating process should be finished without being pausing.
        Throws:
        PDFException - PDFException.ERRCODE_SUCCESS means the calculating progress needs to be continued. If no PDFException is thrown , it means the calculating progress is finished. For more exception information please see definitions PDFException.ERRCODE_XXX .
        See Also:
        PDFException