Foxit PDF SDK

Public Member Functions | Public Attributes | List of all members
foxit::pdf::DRMEncryptData Class Reference

## Public Member Functions
| DRMEncryptData ()
| Constructor.
| DRMEncryptData (bool is_encrypt_metadata, const String &sub_filter, SecurityHandler::CipherType cipher, int key_length, bool is_owner, uint32 user_permissions)
| Constructor, with parameters. More...
| DRMEncryptData (const DRMEncryptData &other)
| Constructor, with another DRM encrypt data object. More...
bool | operator!= (const DRMEncryptData &other) const
| Not equal operator. More...
DRMEncryptData & | operator= (const DRMEncryptData &other)
| Assign operator. More...
bool | operator== (const DRMEncryptData &other) const
| Equal operator. More...
void | Set (bool is_encrypt_metadata, const String &sub_filter, SecurityHandler::CipherType cipher, int key_length, bool is_owner, uint32 user_permissions)
| Set value. More...

## Public Attributes
SecurityHandler::CipherType | cipher
| Cipher type. Please refer to values starting from SecurityHandler::e_CipherRC4 and this should be one of these values except SecurityHandler::e_CipherNone.
bool | is_encrypt_metadata
| A boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata.
bool | is_owner
| 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.
int | key_length
| The key length, in bytes. For SecurityHandler::e_CipherRC4 cipher, this value should be between 5 and 16. For SecurityHandler::e_CipherAES cipher, this value should be 16 or 32.
String | sub_filter
| The sub filter name that specifies the syntax of the encryption dictionary contents.
uint32 | user_permissions
| The user permissions. Please refer to values starting from PDFDoc::e_PermPrint and this can be one or combination of these values.

## Detailed Description

This class represents some data used for class DRMSecurityHandler.

## Constructor & Destructor Documentation

## ◆ DRMEncryptData() [1/2]

foxit::pdf::DRMEncryptData::DRMEncryptData | ( | bool | is_encrypt_metadata,
|  | const String & | sub_filter,
|  | SecurityHandler::CipherType | cipher,
|  | int | key_length,
|  | bool | is_owner,
|  | uint32 | user_permissions
| ) |  |
| inline

Constructor, with parameters.

Parameters

  [in] | is_encrypt_metadata | true means to encrypt metadata, and false means not to encrypt metadata
  [in] | sub_filter | The sub filter name that specifies the syntax of the encryption dictionary contents.
  [in] | cipher | Cipher type. Please refer to values starting from SecurityHandler::e_CipherRC4 and this should be one of these values except SecurityHandler::e_CipherNone.
  [in] | key_length | The key length, in bytes. For SecurityHandler::e_CipherRC4 cipher, this value should be between 5 and 16. For SecurityHandler::e_CipherAES cipher, this value should be 16 or 32.
  [in] | is_owner | true means current user is owner, and false means current user is not owner.
  [in] | user_permissions | The user permissions. Please refer to values starting from PDFDoc::e_PermPrint and this can be one or combination of these values.

## ◆ DRMEncryptData() [2/2]

foxit::pdf::DRMEncryptData::DRMEncryptData | ( | const DRMEncryptData & | other | ) |
| inline

Constructor, with another DRM encrypt data object.

Parameters

  [in] | other | Another DRM encrypt data object.

## Member Function Documentation

## ◆ operator!=()

bool foxit::pdf::DRMEncryptData::operator!= | ( | const DRMEncryptData & | other | ) | const
| inline

Not equal operator.

Parameters

  [in] | other | Another DRM encrypt data object. This function will check if current object is not equal to this one.

Returns
  true means not equal, while false means equal.

## ◆ operator=()

DRMEncryptData& foxit::pdf::DRMEncryptData::operator= | ( | const DRMEncryptData & | other | ) |
| inline

Assign operator.

Parameters

  [in] | other | Another DRM encrypt data object, whose value would be assigned to current object.

Returns
  Reference to current object itself.

## ◆ operator==()

bool foxit::pdf::DRMEncryptData::operator== | ( | const DRMEncryptData & | other | ) | const
| inline

Equal operator.

Parameters

  [in] | other | Another DRM encrypt data object. This function will check if current object is equal to this one.

Returns
  true means equal, while false means not equal.

## ◆ Set()

void foxit::pdf::DRMEncryptData::Set | ( | bool | is_encrypt_metadata,
|  | const String & | sub_filter,
|  | SecurityHandler::CipherType | cipher,
|  | int | key_length,
|  | bool | is_owner,
|  | uint32 | user_permissions
| ) |  |
| inline

Set value.

Parameters

  [in] | is_encrypt_metadata | true means to encrypt metadata, and false means not to encrypt metadata
  [in] | sub_filter | The sub filter name that specifies the syntax of the encryption dictionary contents.
  [in] | cipher | Cipher type. Please refer to values starting from SecurityHandler::e_CipherRC4 and this should be one of these values except SecurityHandler::e_CipherNone.
  [in] | key_length | The key length, in bytes. For SecurityHandler::e_CipherRC4 cipher, this value should be between 5 and 16. For SecurityHandler::e_CipherAES cipher, this value should be 16 or 32.
  [in] | is_owner | true means current user is owner, and false means current user is not owner.
  [in] | user_permissions | The user permissions. Please refer to values starting from PDFDoc::e_PermPrint and this can be one or combination of these values.

Returns
  None.