Foxit PDF SDK

Public Member Functions | List of all members
com.foxit.sdk.pdf.CustomSecurityHandler Class Reference
Inheritance diagram for com.foxit.sdk.pdf.CustomSecurityHandler:

## Public Member Functions
| CustomSecurityHandler ()
| Constructor.
| CustomSecurityHandler (SecurityHandler other)
| Constructor, with parent class object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | initialize (CustomEncryptData encrypt_data, CustomSecurityCallback callback, String encrypt_info) throws com.foxit.sdk.PDFException
| Initialize current custom security handler. More...
Public Member Functions inherited from com.foxit.sdk.pdf.SecurityHandler
| SecurityHandler ()
| Constructor.
| SecurityHandler (SecurityHandler other)
| Constructor, with another security handler object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
int | getSecurityType ()
| Get the encryption type of current security handler. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void | delete ()
| Clean up related C++ resources immediately. More...

## Additional Inherited Members
Static Public Attributes inherited from com.foxit.sdk.pdf.SecurityHandler
static final int | e_CipherAES = 2
| 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).
static final int | e_CipherNone = 0
| Not use encryption algorithm.
static final int | e_CipherRC4 = 1
| Use RC4 encryption algorithm, with the key length between 5 bytes and 16 bytes.

## Detailed Description

This class represents a custom security handler, used for custom encryption.

See also
  SecurityHandler

## Constructor & Destructor Documentation

## ◆ CustomSecurityHandler()

com.foxit.sdk.pdf.CustomSecurityHandler.CustomSecurityHandler | ( | SecurityHandler | other | ) |

Constructor, with parent class object.

Parameters

  [in] | other | Parent class object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.CustomSecurityHandler.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ initialize()

boolean com.foxit.sdk.pdf.CustomSecurityHandler.initialize | ( | CustomEncryptData | encrypt_data,
|  | CustomSecurityCallback | callback,
|  | String | encrypt_info
| ) |  | throws com.foxit.sdk.PDFException

Initialize current custom security handler.

If this function is successfully, Foxit PDF SDK will take over the input security callback object and user should not release this callback object directly anymore; otherwise unexpected crash may occurs later.
Foxit PDF SDK may release the security callback object by callback function SecurityCallback.release , when current security handler is released and find that the callback object has not been used by other object. So, user is recommended not to use the security callback object any more, after current security handler is released.

Parameters

  [in] | encrypt_data | A custom encrypt data object.
  [in] | callback | A valid CustomSecurityCallback object, which is inherited and implemented by user for their own encryption and description algorithm. It should not be null.
  [in] | encrypt_info | The encryption information,which will be stored to document encryption dictionary. This can be an empty string. Default value: an empty string.

Returns
  true means success, while false means failure.