Foxit PDF SDK
fsdk.DRMEncryptData Class Reference

Public Member Functions

def GetCipher ()
 Get cipher type. More...
 
def GetIs_encrypt_metadata ()
 Get a boolean value to decide whether to encrypt metadata or not. More...
 
def GetIs_owner ()
 Get a boolean value to decide whether current user is owner or not. More...
 
def GetKey_length ()
 Get the key length, in bytes. More...
 
def GetSub_filter ()
 Get the sub filter name that specifies the syntax of the encryption dictionary contents. More...
 
def GetUser_permissions ()
 Get the user permissions. More...
 
def Set (is_encrypt_metadata, sub_filter, cipher, key_length, is_owner, user_permissions)
 Set value. More...
 
def SetCipher (value)
 Set cipher type. More...
 
def SetIs_encrypt_metadata (value)
 Set a boolean value to decide whether to encrypt metadata or not. More...
 
def SetIs_owner (value)
 Set a boolean value to decide whether current user is owner or not. More...
 
def SetKey_length (value)
 Set the key length, in bytes. More...
 
def SetSub_filter (value)
 Set the sub filter name that specifies the syntax of the encryption dictionary contents. More...
 
def SetUser_permissions (value)
 Set the user permissions. More...
 

Detailed Description

This class represents some data used for class DRMSecurityHandler .

Member Function Documentation

◆ GetCipher()

fsdk.DRMEncryptData.GetCipher ( )

Get cipher type.

Returns
Cipher type. Please refer to values starting from fsdk.SecurityHandlerE_CipherRC4 and this should be one of these values except fsdk.SecurityHandlerE_CipherNone .

◆ GetIs_encrypt_metadata()

fsdk.DRMEncryptData.GetIs_encrypt_metadata ( )

Get a boolean value to decide whether to encrypt metadata or not.

Returns
A boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata.

◆ GetIs_owner()

fsdk.DRMEncryptData.GetIs_owner ( )

Get a boolean value to decide whether current user is owner or not.

Returns
A boolean value to decide whether current user is owner or not. true means current user is owner, and false means current user is not owner.

◆ GetKey_length()

fsdk.DRMEncryptData.GetKey_length ( )

Get the key length, in bytes.

Returns
The key length, in bytes.
For fsdk.SecurityHandlerE_CipherRC4 cipher, this value should be between 5 and 16.
For fsdk.SecurityHandlerE_CipherAES cipher, this value should be 16 or

◆ GetSub_filter()

fsdk.DRMEncryptData.GetSub_filter ( )

Get the sub filter name that specifies the syntax of the encryption dictionary contents.

Returns
The sub filter name that specifies the syntax of the encryption dictionary contents.

◆ GetUser_permissions()

fsdk.DRMEncryptData.GetUser_permissions ( )

Get the user permissions.

Returns
The user permissions. Please refer to values starting from fsdk.PDFDocE_PermPrint and this can be one or combination of these values.

◆ Set()

def fsdk.DRMEncryptData.Set (   is_encrypt_metadata,
  sub_filter,
  cipher,
  key_length,
  is_owner,
  user_permissions 
)

Set value.

Parameters
[in]is_encrypt_metadatatrue means to encrypt metadata, and false means not to encrypt metadata
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
[in]cipherCipher type. Please refer to values starting from fsdk.SecurityHandlerE_CipherRC4 and this should be one of these values except fsdk.SecurityHandlerE_CipherNone .
[in]key_lengthThe key length, in bytes.
For fsdk.SecurityHandlerE_CipherRC4 cipher, this value should be between 5 and 16.
For fsdk.SecurityHandlerE_CipherAES cipher, this value should be 16 or 32.
[in]is_ownertrue means current user is owner, and false means current user is not owner.
[in]user_permissionsThe user permissions. Please refer to values starting from fsdk.PDFDocE_PermPrint and this can be one or combination of these values.
Returns
None.

◆ SetCipher()

fsdk.DRMEncryptData.SetCipher (   value)

Set cipher type.

Parameters
[in]valueCipher type. Please refer to values starting from fsdk.SecurityHandlerE_CipherRC4 and this should be one of these values except fsdk.SecurityHandlerE_CipherNone .
Returns
None.

◆ SetIs_encrypt_metadata()

fsdk.DRMEncryptData.SetIs_encrypt_metadata (   value)

Set a boolean value to decide whether to encrypt metadata or not.

Parameters
[in]valueA boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata.
Returns
None.

◆ SetIs_owner()

fsdk.DRMEncryptData.SetIs_owner (   value)

Set a boolean value to decide whether current user is owner or not.

Parameters
[in]valueA boolean value to decide whether current user is owner or not. true means current user is owner, and false means current user is not owner.
Returns
None.

◆ SetKey_length()

fsdk.DRMEncryptData.SetKey_length (   value)

Set the key length, in bytes.

Parameters
[in]valueThe key length, in bytes.
For fsdk.SecurityHandlerE_CipherRC4 cipher, this value should be between 5 and 16.
For fsdk.SecurityHandlerE_CipherAES cipher, this value should be 16 or
Returns
None.

◆ SetSub_filter()

fsdk.DRMEncryptData.SetSub_filter (   value)

Set the sub filter name that specifies the syntax of the encryption dictionary contents.

Parameters
[in]valueThe sub filter name that specifies the syntax of the encryption dictionary contents.
Returns
None.

◆ SetUser_permissions()

fsdk.DRMEncryptData.SetUser_permissions (   value)

Set the user permissions.

Parameters
[in]valueThe user permissions. Please refer to values starting from fsdk.PDFDocE_PermPrint and this can be one or combination of these values.
Returns
None.