Foxit PDF SDK

Instance Methods | Properties | List of all members
FSStdEncryptData Class Reference

Inherits NSObject.

## Instance Methods
(id) | - init
| Constructor.
(id) | - initWithIs_encrypt_metadata:user_permissions:cipher:key_length:
| Constructor, with parameters. More...
(id) | - initWithOther:
| Constructor, with another standard encrypt data object. More...
(void) | - set:user_permissions:cipher:key_length:
| 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.
int | key_length
| The key length, in bytes. More...
unsigned int | user_permissions
| The user permissions. Please refer to values starting from FSPDFDocPermPrint and this should be one or combination of these values.

## Detailed Description

This class represents some data used for class FSStdSecurityHandler .

## Method Documentation

## ◆ initWithIs_encrypt_metadata:user_permissions:cipher:key_length:()

- (id) initWithIs_encrypt_metadata: |  | (BOOL) | is_encrypt_metadata
user_permissions: |  | (unsigned int) | user_permissions
cipher: |  | (FSSecurityHandlerCipherType) | cipher
key_length: |  | (int) | key_length

Constructor, with parameters.

Parameters

  [in] | is_encrypt_metadata | YES means to encrypt metadata, and NO means not to encrypt metadata.
  [in] | user_permissions | The user permissions. Please refer to values starting from FSPDFDocPermPrint and this should be one or combination of these values.
  [in] | cipher | Cipher type. Please refer to values starting from FSSecurityHandlerCipherRC4 and this should be one of these values except FSSecurityHandlerCipherNone.
  [in] | key_length | The key length, in bytes. For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16. The preferred one should be 16. For FSSecurityHandlerCipherAES cipher, this value should be 16 (as AES-128) or 32 (as AES-256, only supported in PDF 2.0).

## ◆ initWithOther:()

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

Constructor, with another standard encrypt data object.

Parameters

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

## ◆ set:user_permissions:cipher:key_length:()

- (void) set: |  | (BOOL) | is_encrypt_metadata
user_permissions: |  | (unsigned int) | user_permissions
cipher: |  | (FSSecurityHandlerCipherType) | cipher
key_length: |  | (int) | key_length

Set value.

Parameters

  [in] | is_encrypt_metadata | YES means to encrypt metadata, and NO means not to encrypt metadata.
  [in] | user_permissions | The user permissions. Please refer to values starting from FSPDFDocPermPrint and this should be one or combination of these values.
  [in] | cipher | Cipher type. Please refer to values starting from FSSecurityHandlerCipherRC4 and this should be one of these values except FSSecurityHandlerCipherNone.
  [in] | key_length | The key length, in bytes. For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16. The preferred one should be 16. For FSSecurityHandlerCipherAES cipher, this value should be 16 (as AES-128) or 32 (as AES-256, only supported in PDF 2.0).

Returns
  None.

## Property Documentation

## ◆ key_length

- (int) key_length
| read write nonatomic assign

The key length, in bytes.

- For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16. The preferred one should be 16.
- For FSSecurityHandlerCipherAES cipher, this value should be 16 (as AES-128) or 32 (as AES-256, only supported in PDF 2.0).