Foxit PDF SDK
FoxitPDFSDKPython3.DRMSecurityHandler Class Reference
Inheritance diagram for FoxitPDFSDKPython3.DRMSecurityHandler:
FoxitPDFSDKPython3.SecurityHandler FoxitPDFSDKPython3.Base

Public Member Functions

def DRMSecurityHandler ()
 Constructor function.

 
def DRMSecurityHandler (other)
 Constructor, with parent class object.
More...
 
def GetDRMValue (key)
 Get the DRM value for a specified parameter.
More...
 
def Initialize (encrypt_data, file_id, initial_key)
 Initialize current DRM security handler.
More...
 
def SetDRMValue (key, value)
 Set the DRM value for a specified parameter.
More...
 
def VerifyEncryptionParams ()
 Verify encryption parameters.
More...
 
- Public Member Functions inherited from FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.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 Foxit DRM(Digital Right Management) security handler, used for Foxit DRM encryption.

See also
SecurityHandler

Constructor & Destructor Documentation

◆ DRMSecurityHandler()

def FoxitPDFSDKPython3.DRMSecurityHandler.DRMSecurityHandler (   other)

Constructor, with parent class object.

Parameters
[in]otherParent class object.

Member Function Documentation

◆ GetDRMValue()

def FoxitPDFSDKPython3.DRMSecurityHandler.GetDRMValue (   key)

Get the DRM value for a specified parameter.

Parameters
[in]keyA parameter string as the key name. It should not be an empty string. Followings are pre-defined key names:
  • Issuer: issuer name.
  • Creator: creator of this file.
  • FileID: file ID.
  • FlowCode: flow code for application control.
  • Order: order number.
  • User: user name.
  • ServiceURL: service URL for remote server.
  • Vender: vender name.

Returns
The value string for a specified parameter.

◆ Initialize()

def FoxitPDFSDKPython3.DRMSecurityHandler.Initialize (   encrypt_data,
  file_id,
  initial_key 
)

Initialize current DRM security handler.

Parameters
[in]encrypt_dataA certificate encrypt data object. In the encryption data, cipher type should not be FoxitPDFSDKPython3.SecurityHandler.e_CipherNone .
[in]file_idThe file identity string.
[in]initial_keyThe user specified initial key for encryption.
Returns
true means success, while false means failure.

◆ SetDRMValue()

def FoxitPDFSDKPython3.DRMSecurityHandler.SetDRMValue (   key,
  value 
)

Set the DRM value for a specified parameter.

Parameters
[in]keyA parameter string as the key name. It should not be an empty string. Followings are pre-defined key names:
  • Issuer: issuer name.
  • Creator: creator of this file.
  • FileID: file ID.
  • FlowCode: flow code for application control.
  • Order: order number.
  • User: user name.
  • ServiceURL: service URL for remote server.
  • Vender: vender name.

[in]valueNew value string for specified parameter.
Returns
true means success, while false means failure.

◆ VerifyEncryptionParams()

def FoxitPDFSDKPython3.DRMSecurityHandler.VerifyEncryptionParams ( )

Verify encryption parameters.

Foxit DRM maintains a set of encryption parameters for application purpose. Encryption parameters are stored in PDF file and protected by verification algorithm. So application can call this function to verify a DRM encrypted PDF document. If the verification is failed, that means the PDF document might be distorted.

Returns
true means the verification is successful, while false means the verification is failed.