Foxit PDF SDK

Public Member Functions | List of all members
foxit.pdf.DRMSecurityHandler Class Reference
Inheritance diagram for foxit.pdf.DRMSecurityHandler:

## Public Member Functions
| DRMSecurityHandler ()
| Constructor function.
| DRMSecurityHandler (SecurityHandler other)
| Constructor, with parent class object. More...
string | GetDRMValue (string key)
| Get the DRM value for a specified parameter. More...
bool | Initialize (DRMEncryptData encrypt_data, string file_id, string initial_key)
| Initialize current DRM security handler. More...
bool | SetDRMValue (string key, string value)
| Set the DRM value for a specified parameter. More...
bool | VerifyEncryptionParams ()
| Verify encryption parameters. More...
Public Member Functions inherited from foxit.pdf.SecurityHandler
| SecurityHandler ()
| Constructor.
| SecurityHandler (SecurityHandler other)
| Constructor, with another security handler object. More...
virtual PDFDoc.EncryptType | GetSecurityType ()
| Get the encryption type of current security handler. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...

## Additional Inherited Members
Public Types inherited from foxit.pdf.SecurityHandler
enum | CipherType { CipherType.e_CipherNone = 0, CipherType.e_CipherRC4 = 1, CipherType.e_CipherAES = 2 }
| Enumeration for Encryption Algorithm. More...

## 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()

foxit.pdf.DRMSecurityHandler.DRMSecurityHandler | ( | SecurityHandler | other | ) |
| inline

Constructor, with parent class object.

Parameters

  [in] | other | Parent class object.

## Member Function Documentation

## ◆ GetDRMValue()

string foxit.pdf.DRMSecurityHandler.GetDRMValue | ( | string | key | ) |
| inline

Get the DRM value for a specified parameter.

Parameters

  [in] | key | A 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()

bool foxit.pdf.DRMSecurityHandler.Initialize | ( | DRMEncryptData | encrypt_data,
|  | string | file_id,
|  | string | initial_key
| ) |  |
| inline

Initialize current DRM security handler.

Parameters

  [in] | encrypt_data | A certificate encrypt data object. In the encryption data, cipher type should not be foxit.pdf.SecurityHandler.CipherType.e_CipherNone .
  [in] | file_id | The file identity string.
  [in] | initial_key | The user specified initial key for encryption.

Returns
  true means success, while false means failure.

## ◆ SetDRMValue()

bool foxit.pdf.DRMSecurityHandler.SetDRMValue | ( | string | key,
|  | string | value
| ) |  |
| inline

Set the DRM value for a specified parameter.

Parameters

  [in] | key | A 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] | value | New value string for specified parameter.

Returns
  true means success, while false means failure.

## ◆ VerifyEncryptionParams()

bool foxit.pdf.DRMSecurityHandler.VerifyEncryptionParams | ( |  | ) |
| inline

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.