Foxit PDF SDK
fsdk.CertificateSecurityCallback Class Reference

Public Member Functions

def GetDecryptionKey (envelope_buffer, envelope_length)
 A callback function used to get the key for decrypting certificate protected PDF document. More...
 
def GetSecurityType ()
 Get the encryption type of current security callback. More...
 

Detailed Description

This class represents a callback object for certificate decryption. If user wants to use their own certificate security callback, user should inherit this callback class and implement the pure virtual functions (as callback functions), and then register their own certificate security callback object to Foxit PDF SDK by function fsdk.LibraryRegisterSecurityCallback with filter "Adobe.PubSec". Function fsdk.LibraryUnregisterSecurityCallback can be called to unregister the security callback object with the registered filter name.

Member Function Documentation

◆ GetDecryptionKey()

def fsdk.CertificateSecurityCallback.GetDecryptionKey (   envelope_buffer,
  envelope_length 
)

A callback function used to get the key for decrypting certificate protected PDF document.

Parameters
[in]envelope_bufferA buffer which represents a certificate envelope.
[in]envelope_lengthLength of certificate envelope buffer, in bytes.
Note
User should implement this callback function.
Returns
The decryption key.

◆ GetSecurityType()

def fsdk.CertificateSecurityCallback.GetSecurityType ( )

Get the encryption type of current security callback.

Note
User should not override this function, otherwise there will be unexpected behavior.
Returns
The encryption type. It would always be fsdk.PDFDocE_EncryptCertificate .