|
Foxit PDF SDK
|
Public Member Functions | |
| def | CheckCertificateValidity (cert_path, cert_password, client_data) |
| A callback function used to check the validity of a certificate. More... | |
| def | ContinueCalcDigest (client_data, pause) |
| A callback function used to continue the custom digest calculation process. More... | |
| def | GetDigest (client_data) |
| A callback function used to get the digest after the calculation process is finished. More... | |
| def | IsNeedPadData () |
| A callback function used to check whether to return all contents with padding zero or not, when callback function fsdk.SignatureCallback.VerifySigState is called. More... | |
| def | Release () |
| A callback function used to release current callback object itself. More... | |
| def | Sign (digest, digest_length, cert_file_stream, cert_password, digest_algorithm, client_data) |
| A callback function used to do signing and return the signed data. More... | |
| def | Sign (digest, digest_length, cert_path, cert_password, digest_algorithm, client_data) |
| A callback function used to do signing and return the signed data. More... | |
| def | VerifySigState (digest, digest_length, signed_data, signed_data_len, client_data) |
| A callback function used to verify the integrity of a signature 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 fsdk.LibraryRegisterSignatureCallback with filter and sub filter as the callback name.
| def fsdk.SignatureCallback.CheckCertificateValidity | ( | cert_path, | |
| cert_password, | |||
| client_data | |||
| ) |
A callback function used to check the validity of a certificate.
This callback function will be triggered when function fsdk.Signature.StartSign is called. If no need to check the certificate, value fsdk.SignatureCallbackE_CertValid can be returned directly.
| [in] | cert_path | A full path of a certificate file (including file name and extension), which will be used for signing. This is passed by user from function fsdk.Signature.StartSign . |
| [in] | cert_password | A password string used to open the cert file. If this is an empty string, that means no password is required.This is passed by user from function fsdk.Signature.StartSign . |
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign . |
| def fsdk.SignatureCallback.ContinueCalcDigest | ( | client_data, | |
| pause | |||
| ) |
A callback function used to continue the custom digest calculation process.
| [in] | 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 NeedToPauseNow() of this input parameter and decide when to pause the calculation process. |
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign or fsdk.Signature.StartVerify . |
| def fsdk.SignatureCallback.GetDigest | ( | 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.
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign or fsdk.Signature.StartVerify . |
| def fsdk.SignatureCallback.IsNeedPadData | ( | ) |
A callback function used to check whether to return all contents with padding zero or not, when callback function fsdk.SignatureCallback.VerifySigState is called.
| def fsdk.SignatureCallback.Release | ( | ) |
A callback function used to release current callback object itself.
| def fsdk.SignatureCallback.Sign | ( | digest, | |
| digest_length, | |||
| cert_file_stream, | |||
| cert_password, | |||
| digest_algorithm, | |||
| 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.
| [in] | digest | The digest data buffer, for source file buffer to be signed. |
| [in] | digest_length | The size of digest data buffer. |
| [in] | cert_file_stream | A fsdk.StreamCallback object which is implemented by user to access content of a certificate file which will be used for signing. |
| [in] | cert_password | The password string, used to open the cert file. If this is an empty string, that means no password is required. |
| [in] | digest_algorithm | The algorithm of message digest for signed data. Please refer to values starting from fsdk.SignatureE_DigestSHA1 and this would be one of these values. |
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign or fsdk.Signature.StartVerify . |
| def fsdk.SignatureCallback.Sign | ( | digest, | |
| digest_length, | |||
| cert_path, | |||
| cert_password, | |||
| digest_algorithm, | |||
| 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.
| [in] | digest | The digest data buffer, for source file buffer to be signed. |
| [in] | digest_length | The size of digest data buffer. |
| [in] | cert_path | The certificate file path, which will be used for signing. |
| [in] | cert_password | The password string, used to open the cert file. If this is an empty string, that means no password is required. |
| [in] | digest_algorithm | The algorithm of message digest for signed data. Please refer to values starting from fsdk.SignatureE_DigestSHA1 and this would be one of these values. |
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign or fsdk.Signature.StartVerify . |
| def fsdk.SignatureCallback.VerifySigState | ( | digest, | |
| digest_length, | |||
| signed_data, | |||
| signed_data_len, | |||
| client_data | |||
| ) |
A callback function used to verify the integrity of a signature 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.
From 7.0, this callback function is only used to verify the intergrity of a signature. Please check the comment about return value for more details.
| [in] | digest | The digest data buffer, for source file buffer to be verified. |
| [in] | digest_length | The size of digest data buffer. |
| [in] | signed_data | The signed data buffer. |
| [in] | signed_data_len | The size of signed data buffer. |
| [in] | client_data | A user-defined object, which is passed by user from function fsdk.Signature.StartSign or fsdk.Signature.StartVerify . |