Foxit PDF SDK
FSStdSecurityHandler Class Reference
Inheritance diagram for FSStdSecurityHandler:
FSSecurityHandler FSBase

Instance Methods

(id) - init
 Constructor.

 
(BOOL) - initialize:user_password:owner_password:
 (Not support AES-256) Initialize current standard security handler.
More...
 
(BOOL) - initializeW:user_password:owner_password:
 (Only for AES-256) Initialize current standard security handler.
More...
 
(id) - initWithOther:
 Constructor, with parent class object.
More...
 
(void) - setAES256ModifyFlags:
 (Only for AES-256) Set modify flags to decide which security data or password will be modified during encryption process.
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 standard security handler, used for password encryption.

See also
FSSecurityHandler

Method Documentation

◆ initialize:user_password:owner_password:()

- (BOOL) initialize: (FSStdEncryptData*)  encrypt_data
user_password: (NSString *)  user_password
owner_password: (NSString *)  owner_password 

(Not support AES-256) Initialize current standard security handler.

Parameters
[in]user_passwordA user password, which is used to open the PDF document. This can be empty when parameter owner_password is not empty.
[in]owner_passwordAn owner password, which is used to take ownership of the PDF document. This can be empty when parameter user_password is not empty.
[in]encrypt_dataA standard encrypt data object. In the encryption data, cipher type should not be FSSecurityHandlerCipherNone, or FSSecurityHandlerCipherAES with key length 32 (that means not support AES-256). Please refer to comment of class FSStdEncryptData to ensure the validation of each member.
Returns
YES means success, while NO means failure.

◆ initializeW:user_password:owner_password:()

- (BOOL) initializeW: (FSStdEncryptData*)  encrypt_data
user_password: (NSString *)  user_password
owner_password: (NSString *)  owner_password 

(Only for AES-256) Initialize current standard security handler.

Parameters
[in]user_passwordA user password, which is used to open the PDF document. This can be empty when parameter owner_password is not empty.
[in]owner_passwordAn owner password, which is used to take ownership of the PDF document. This can be empty when parameter user_password is not empty.
[in]encrypt_dataA standard encrypt data object. In the encryption data, cipher type should be FSSecurityHandlerCipherAES and key length should be 32.
Returns
YES means success, while NO means failure.

◆ initWithOther:()

- (id) initWithOther: (FSSecurityHandler*)  other

Constructor, with parent class object.

Parameters
[in]otherParent class object.

Reimplemented from FSSecurityHandler.

◆ setAES256ModifyFlags:()

- (void) setAES256ModifyFlags: (unsigned int)  modify_flags

(Only for AES-256) Set modify flags to decide which security data or password will be modified during encryption process.

Modify flags are useful only when a PDF document has been encrypted by AES-256 and current FSStdSecurityHandler object is to be used to modify some security data or password for this PDF document. For other case, these modify flags will be ignored during encryption process. Security data and passwords are set through function StdSecurityHandler::InitializeW. If this function has not been called by current FSStdSecurityHandler object, that means to modify all the security data and password by default.

Parameters
[in]modify_flagsModify flags used to decide which security data or password will be modified during encryption process. Please refer to values starting from FSStdSecurityHandlerModifyPermission and this should be one or combination of these values.
Returns
None.