Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.SecurityHandler Class Reference
Inheritance diagram for foxit.pdf.SecurityHandler:

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

## Public Member Functions
| SecurityHandler ()
| Constructor.
| SecurityHandler (SecurityHandler other)
| Constructor, with another security handler object. More...
virtual PDFDoc.EncryptType | GetSecurityType ()
| Get the encryption type of current security handler. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...

## Detailed Description

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

- Class StdSecurityHandler is used for password encryption.

- Class CertificateSecurityHandler is used for certificate encryption.

- Class DRMSecurityHandler is used for DRM encryption.

- Class CustomSecurityHandler is used for custom encryption.

- Class RMSSecurityHandler is used for RMS encryption.

To set a security handler to a PDF document, please call function 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 PDFDoc.SetSecurityHandler .

See also
  StdSecurityHandler
  CertificateSecurityHandler
  DRMSecurityHandler
  CustomSecurityHandler
  RMSSecurityHandler
  PDFDoc

## Member Enumeration Documentation

## ◆ CipherType

enum foxit.pdf.SecurityHandler.CipherType
| strong

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 | ( | SecurityHandler | other | ) |
| inline

Constructor, with another security handler object.

Parameters

  [in] | other | Another security handler object.

## Member Function Documentation

## ◆ GetSecurityType()

PDFDoc.EncryptType foxit.pdf.SecurityHandler.GetSecurityType | ( |  | ) |
| inline virtual

Get the encryption type of current security handler.

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

## ◆ IsEmpty()

bool foxit.pdf.SecurityHandler.IsEmpty | ( |  | ) |
| inline

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.