Foxit PDF SDK
FSDRMEncryptData Class Reference

Inherits NSObject.

Instance Methods

(id) - init
 Constructor.

 
(id) - initWithIs_encrypt_metadata:sub_filter:cipher:key_length:is_owner:user_permissions:
 Constructor, with parameters.
More...
 
(id) - initWithOther:
 Constructor, with another DRM encrypt data object.
More...
 
(void) - set:sub_filter:cipher:key_length:is_owner:user_permissions:
 Set value.
More...
 

Properties

FSSecurityHandlerCipherType cipher
 Cipher type. Please refer to values starting from FSSecurityHandlerCipherRC4 and this should be one of these values except FSSecurityHandlerCipherNone.

 
BOOL is_encrypt_metadata
 A boolean value to decide whether to encrypt metadata or not. YES means to encrypt metadata, and NO means not to encrypt metadata.

 
BOOL is_owner
 A boolean value to decide whether current user is owner or not. YES means current user is owner, and NO means current user is not owner.

 
int key_length
 The key length, in bytes.
For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16.
For FSSecurityHandlerCipherAES cipher, this value should be 16 or 32.

 
NSString * sub_filter
 The sub filter of PDF document.

 
unsigned int user_permissions
 The user permissions. Please refer to values starting from FSPDFDocPermPrint and this can be one or combination of these values.

 

Detailed Description

This class represents some data used for class FSDRMSecurityHandler .

Method Documentation

◆ initWithIs_encrypt_metadata:sub_filter:cipher:key_length:is_owner:user_permissions:()

- (id) initWithIs_encrypt_metadata: (BOOL)  is_encrypt_metadata
sub_filter: (NSString *)  sub_filter
cipher: (FSSecurityHandlerCipherType cipher
key_length: (int)  key_length
is_owner: (BOOL)  is_owner
user_permissions: (unsigned int)  user_permissions 

Constructor, with parameters.

Parameters
[in]is_encrypt_metadataYES means to encrypt metadata, and NO means not to encrypt metadata
[in]sub_filterThe sub filter of PDF document.
[in]cipherCipher type. Please refer to values starting from FSSecurityHandlerCipherRC4 and this should be one of these values except FSSecurityHandlerCipherNone.
[in]key_lengthThe key length, in bytes.
For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16.
For FSSecurityHandlerCipherAES cipher, this value should be 16 or 32.
[in]is_ownerYES means current user is owner, and NO means current user is not owner.
[in]user_permissionsThe user permissions. Please refer to values starting from FSPDFDocPermPrint and this can be one or combination of these values.

◆ initWithOther:()

- (id) initWithOther: (FSDRMEncryptData*)  other

Constructor, with another DRM encrypt data object.

Parameters
[in]otherAnother DRM encrypt data object.

◆ set:sub_filter:cipher:key_length:is_owner:user_permissions:()

- (void) set: (BOOL)  is_encrypt_metadata
sub_filter: (NSString *)  sub_filter
cipher: (FSSecurityHandlerCipherType cipher
key_length: (int)  key_length
is_owner: (BOOL)  is_owner
user_permissions: (unsigned int)  user_permissions 

Set value.

Parameters
[in]is_encrypt_metadataYES means to encrypt metadata, and NO means not to encrypt metadata
[in]sub_filterThe sub filter of PDF document.
[in]cipherCipher type. Please refer to values starting from FSSecurityHandlerCipherRC4 and this should be one of these values except FSSecurityHandlerCipherNone.
[in]key_lengthThe key length, in bytes.
For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16.
For FSSecurityHandlerCipherAES cipher, this value should be 16 or 32.
[in]is_ownerYES means current user is owner, and NO means current user is not owner.
[in]user_permissionsThe user permissions. Please refer to values starting from FSPDFDocPermPrint and this can be one or combination of these values.
Returns
None.