Public Member Functions | |
int | continueCalcDigest (java.lang.Object client_data, PauseCallback pause) |
A callback function used to continue the custom digest calculation process. More... | |
byte [] | getDigest (java.lang.Object client_data) |
A callback function used to get the digest after the calculation process is finished. More... | |
boolean | isNeedPadData () |
Check whether to return all contents with padding zero or not, when callback function SignatureCallback::verifySigState is called. More... | |
void | release () |
A callback function used to release current SignatureCallback object itself. More... | |
byte [] | sign (byte[] digest, String cert_path, byte[] cert_password, int digest_algorithm, java.lang.Object client_data) |
A callback function used to do signing and return the signed data. More... | |
boolean | startCalcDigest (FileReaderCallback file, int[] byte_range_array, Signature signature, java.lang.Object client_data) |
A callback function used to start a custom digest calculation, mainly to initialize the calculation process. More... | |
int | verifySigState (byte[] digest, byte[] signed_data, java.lang.Object client_data) |
A callback function used to do verifying and return the verify state. More... | |
This class represent a callback object to sign or verify signature. All the pure virtual functions in this class are used as callback functions and should be implemented by user, in order to sign or verify signature in a customized way.
User can set register customized signature callback object to Foxit PDF SDK by function common::Library::registerSignatureCallback with filter and sub filter as the callback name.
int com.foxit.sdk.pdf.SignatureCallback.continueCalcDigest | ( | java.lang.Object | client_data, |
PauseCallback | pause | ||
) |
A callback function used to continue the custom digest calculation process.
pause | Pause object which decides if the calculation process needs to be paused. If this is null, it means not to pause during the calculation process. If this is not null, please check the the return value of function PauseCallback::NeedToPauseNow and decide when to pause the calculation process. |
client_data | A user-defined object, which is passed by user from function Signature::startSign or Signature::startVerify. |
byte[] com.foxit.sdk.pdf.SignatureCallback.getDigest | ( | java.lang.Object | client_data | ) |
A callback function used to get the digest after the calculation process is finished.
This callback function will be triggered when the calculation process is finished successfully.
client_data | A user-defined object, which is passed by user from function Signature::startSign or Signature::startVerify. |
boolean com.foxit.sdk.pdf.SignatureCallback.isNeedPadData | ( | ) |
Check whether to return all contents with padding zero or not, when callback function SignatureCallback::verifySigState is called.
void com.foxit.sdk.pdf.SignatureCallback.release | ( | ) |
A callback function used to release current SignatureCallback object itself.
byte[] com.foxit.sdk.pdf.SignatureCallback.sign | ( | byte [] | digest, |
String | cert_path, | ||
byte [] | cert_password, | ||
int | digest_algorithm, | ||
java.lang.Object | client_data | ||
) |
A callback function used to do signing and return the signed data.
Host application provides this callback function for custom sign mechanism. This callback function would be triggered during the signature signing process.
digest | The digest data buffer, for source file buffer to be signed. |
cert_path | The certificate file path, which will be used for signing. |
cert_password | The password string, used to open the cert file. If this is an empty string, that means no password is required. |
digest_algorithm | The algorithm of message digest for signed data. Please refer to values starting from e_DigestSHA1 and this would be one of these values. |
client_data | A user-defined object, which is passed by user from function Signature::startSign or Signature::startVerify. |
boolean com.foxit.sdk.pdf.SignatureCallback.startCalcDigest | ( | FileReaderCallback | file, |
int [] | byte_range_array, | ||
Signature | signature, | ||
java.lang.Object | client_data | ||
) |
A callback function used to start a custom digest calculation, mainly to initialize the calculation process.
file | When signing a signature, this represents the source file object to be signed. When verifying a signature field, this represents the source file object to be verified. |
byte_range_array | A byte range array of the signed document(not the source document). Elements in this array always be in pairs of offset-size values in order of: offset,size,offset,size... |
signature | A signature object. |
client_data | A user-defined object, which is passed by user from function Signature::startSign or Signature::startVerify. |
int com.foxit.sdk.pdf.SignatureCallback.verifySigState | ( | byte [] | digest, |
byte [] | signed_data, | ||
java.lang.Object | client_data | ||
) |
A callback function used to do verifying and return the verify state.
Host application provides this callback function for custom sign mechanism. This callback function would be triggered during the signature verifying process.
digest | The digest data buffer, for source file buffer to be verified. |
signed_data | The signed data buffer. |
client_data | A user-defined object, which is passed by user from function Signature::startSign or Signature::startVerify. |