Foxit PDF SDK
FoxitPDFSDKPython2.CustomSecurityHandler Class Reference
Inheritance diagram for FoxitPDFSDKPython2.CustomSecurityHandler:
FoxitPDFSDKPython2.SecurityHandler FoxitPDFSDKPython2.Base

Public Member Functions

def CustomSecurityHandler ()
 Constructor.

 
def CustomSecurityHandler (other)
 Constructor, with parent class object.
More...
 
def Initialize (encrypt_data, callback, encrypt_info)
 Initialize current custom security handler.
More...
 
- Public Member Functions inherited from FoxitPDFSDKPython2.SecurityHandler
def SecurityHandler ()
 Constructor.

 
def SecurityHandler (other)
 Constructor, with another security handler object.
More...
 
def GetSecurityType ()
 Get the encryption type of current security handler.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 

Additional Inherited Members

- Static Public Attributes inherited from FoxitPDFSDKPython2.SecurityHandler
 e_CipherAES = _fsdk.SecurityHandler_e_CipherAES
 Use AES encryption algorithm, with the key length be 16 bytes (as AES-128) or 32 bytes (as AES-256, only supported in PDF 2.0).

 
 e_CipherNone = _fsdk.SecurityHandler_e_CipherNone
 Not use encryption algorithm.

 
 e_CipherRC4 = _fsdk.SecurityHandler_e_CipherRC4
 Use RC4 encryption algorithm, with the key length between 5 bytes and 16 bytes.

 

Detailed Description

This class represents a custom security handler, used for custom encryption.

See also
SecurityHandler

Constructor & Destructor Documentation

◆ CustomSecurityHandler()

def FoxitPDFSDKPython2.CustomSecurityHandler.CustomSecurityHandler (   other)

Constructor, with parent class object.

Parameters
[in]otherParent class object.

Member Function Documentation

◆ Initialize()

def FoxitPDFSDKPython2.CustomSecurityHandler.Initialize (   encrypt_data,
  callback,
  encrypt_info 
)

Initialize current custom security handler.

If this function is successfully, Foxit PDF SDK will take over the input security callback object and user should not release this callback object directly anymore; otherwise unexpected crash may occurs later.
Foxit PDF SDK may release the security callback object by callback function FoxitPDFSDKPython2.SecurityCallback.Release , when current security handler is released and find that the callback object has not been used by other object. So, user is recommended not to use the security callback object any more, after current security handler is released.

Parameters
[in]encrypt_dataA custom encrypt data object.
[in]callbackA valid CustomSecurityCallback object, which is inherited and implemented by user for their own encryption and description algorithm. It should not be null.
[in]encrypt_infoThe encryption information,which will be stored to document encryption dictionary. This can be an empty string.
Returns
true means success, while false means failure.