foxit::pdf::SecurityHandler Class Reference
Inheritance diagram for foxit::pdf::SecurityHandler:
foxit::Base foxit::pdf::CertificateSecurityHandler foxit::pdf::CustomSecurityHandler foxit::pdf::DRMSecurityHandler foxit::pdf::RMSSecurityHandler foxit::pdf::StdSecurityHandler

Public Types

enum  CipherType { e_CipherNone = 0, e_CipherRC4 = 1, e_CipherAES = 2 }
 Enumeration for Encryption Algorithm. More...
 

Public Member Functions

 SecurityHandler ()
 Constructor.
 
 SecurityHandler (const SecurityHandler &other)
 Constructor, with another SecurityHandler object. More...
 
virtual ~SecurityHandler ()
 Destructor.
 
virtual PDFDoc::EncryptType GetSecurityType ()
 Get the encryption type of current security handler. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator!= (const SecurityHandler &other)
 Not equal operator. More...
 
SecurityHandleroperator= (const SecurityHandler &other)
 Assign operator. More...
 
bool operator== (const SecurityHandler &other)
 Equal operator. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. More...
 

Detailed Description

Class SecurityHandler is the base class that represents a security hander used for encrypting PDF document. It has following derived classes:

To set a security handler to a PDF document, please call function pdf::PDFDoc::SetSecurityHandler, then the security handler will take effect in later saving process. To get the security handler used for a PDF document, please call function pdf::PDFDoc::SetSecurityHandler.

See also
StdSecurityHandler
CertificateSecurityHandler
DRMSecurityHandler
CustomSecurityHandler
RMSSecurityHandler
pdf::PDFDoc

Member Enumeration Documentation

◆ CipherType

Enumeration for Encryption Algorithm.

Values of this enumeration should be used alone.

Enumerator
e_CipherNone 

Not use encryption algorithm.

e_CipherRC4 

Use RC4 encryption algorithm, with the key length between 5 bytes and 16 bytes.

e_CipherAES 

Use AES encryption algorithm, with the key length be 16 bytes (as AES-128) or 32 bytes (as AES-256, only supported in PDF 2.0).

Constructor & Destructor Documentation

◆ SecurityHandler()

foxit::pdf::SecurityHandler::SecurityHandler ( const SecurityHandler other)

Constructor, with another SecurityHandler object.

Parameters
[in]otherAnother SecurityHandler object.

Member Function Documentation

◆ GetSecurityType()

virtual PDFDoc::EncryptType foxit::pdf::SecurityHandler::GetSecurityType ( )
virtual

Get the encryption type of current security handler.

Returns
The encryption type. If current SecurityHandler object does not represent any specified type of security handler, it would return PDFDoc::e_EncryptUnknown.

◆ IsEmpty()

bool foxit::pdf::SecurityHandler::IsEmpty ( ) const

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ operator!=()

bool foxit::pdf::SecurityHandler::operator!= ( const SecurityHandler other)

Not equal operator.

Parameters
[in]otherAnother SecurityHandler object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

SecurityHandler& foxit::pdf::SecurityHandler::operator= ( const SecurityHandler other)

Assign operator.

Parameters
[in]otherAnother SecurityHandler object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::pdf::SecurityHandler::operator== ( const SecurityHandler other)

Equal operator.

Parameters
[in]otherAnother SecurityHandler object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.