Foxit PDF SDK
FSDK.CustomSecurityCallback Class Reference
Inheritance diagram for FSDK.CustomSecurityCallback:
FSDK.RMSSecurityCallback

Public Member Functions

 CreateContext (filter, sub_filter, encrypt_info)
 A callback function used to create context for encryption and decryption. More...
 
 ReleaseContext (context) GetUserPermissions(context
 A callback function used to release the context for encryption and decryption. More...
 

Detailed Description

This class represents a callback object for custom decryption and encryption. If user wants to use custom security callback, user should inherit this callback class and implement the pure virtual functions (as callback functions), and then register the custom security callback object to Foxit PDF SDK by function FSDK.Library.RegisterSecurityCallback with with any custom filter name (following the PDF name conventions). Function FSDK.Library.UnregisterSecurityCallback can be called to unregister the security callback object with the registered filter name.

Member Function Documentation

◆ CreateContext()

FSDK.CustomSecurityCallback.CreateContext (   filter,
  sub_filter,
  encrypt_info 
)
inline

A callback function used to create context for encryption and decryption.

Parameters
[in]filterThe filter name of the custom security callback object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
[in]encrypt_infoThe encryption information of the PDF document.
Note
User should implement this callback function.
Returns
The encryption context.

◆ ReleaseContext()

FSDK.CustomSecurityCallback.ReleaseContext (   context)

A callback function used to release the context for encryption and decryption.

Parameters
[in]contextThe context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext.
Note
User should implement this callback function.
Returns
true means success, while false means failure.A callback function used to get the user permissions.
Parameters
[in]contextThe context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext.
[in]user_permissionOriginal permission settings of the document. Please refer to values starting from FSDK.PDFDoc.e_PermPrint and this would be one or combination of these values.
Note
User should implement this callback function.
Returns
The new user permissions. Please refer to values starting from FSDK.PDFDoc.e_PermPrint and this should be one or combination of these values.