Foxit PDF SDK

Instance Methods | List of all members
FSDRMSecurityHandler Class Reference
Inheritance diagram for FSDRMSecurityHandler:

## Instance Methods
(NSString *) | - getDRMValue:
| Get the DRM value for a specified parameter. More...
(id) | - init
| Constructor function.
(BOOL) | - initialize:file_id:initial_key:
| Initialize current DRM security handler. More...
(id) | - initWithOther:
| Constructor, with parent class object. More...
(BOOL) | - setDRMValue:value:
| Set the DRM value for a specified parameter. More...
(BOOL) | - verifyEncryptionParams
| Verify encryption parameters. More...
Instance Methods inherited from FSSecurityHandler
(FSPDFDocEncryptType) | - getSecurityType
| Get the encryption type of current security handler. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...

## Detailed Description

This class represents a Foxit DRM(Digital Right Management) security handler, used for Foxit DRM encryption.

See also
  FSSecurityHandler

## Method Documentation

## ◆ getDRMValue:()

- (NSString *) getDRMValue: |  | (NSString *) | key |

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:file_id:initial_key:()

- (BOOL) initialize: |  | (FSDRMEncryptData*) | encrypt_data
file_id: |  | (NSString *) | file_id
initial_key: |  | (NSData *) | initial_key

Initialize current DRM security handler.

Parameters

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

Returns
  YES means success, while NO means failure.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSSecurityHandler*) | other |

Constructor, with parent class object.

Parameters

  [in] | other | Parent class object.

Reimplemented from FSSecurityHandler.

## ◆ setDRMValue:value:()

- (BOOL) setDRMValue: |  | (NSString *) | key
value: |  | (NSString *) | value

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
  YES means success, while NO means failure.

## ◆ verifyEncryptionParams()

- (BOOL) 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
  YES means the verification is successful, while NO means the verification is failed.