Foxit PDF SDK
|
Public Member Functions | |
CreateContext (filter, sub_filter, encrypt_info) | |
A callback function used to create context for encryption and decryption. More... | |
DecryptData (decryptor, encrypted_data, encrypted_data_len) | |
A callback function used to decrypt the encrypted data. More... | |
FinishDecryptor (decryptor) | |
A callback function used to finish the decryption. More... | |
GetCipher (context) | |
A callback function used to get the cipher type. More... | |
GetEncryptedSize (context, obj_num, gen_num, src_data, src_data_len) EncryptData(context | |
A callback function used to get the estimated encrypted size. More... | |
GetEncryptKey (context) GetDecryptedSize(context | |
A callback function used to get the encryption key. More... | |
IsOwner (context) | |
A callback function used to check if current user is the owner of the PDF document. More... | |
ReleaseContext (context) GetUserPermissions(context | |
A callback function used to release the context for encryption and decryption. More... | |
StartDecryptor (context, obj_num, gen_num) | |
A callback function used to start a decryption. More... | |
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.
FSDK.CustomSecurityCallback.CreateContext | ( | filter | , |
sub_filter | , | ||
encrypt_info | |||
) |
A callback function used to create context for encryption and decryption.
[in] | filter | The filter name of the custom security callback object. |
[in] | sub_filter | The sub filter name that specifies the syntax of the encryption dictionary contents. |
[in] | encrypt_info | The encryption information of the PDF document. |
FSDK.CustomSecurityCallback.DecryptData | ( | decryptor | , |
encrypted_data | , | ||
encrypted_data_len | |||
) |
A callback function used to decrypt the encrypted data.
[in] | decryptor | The decryptor implemented and created by user, returned by callback function FSDK.CustomSecurityCallback.StartDecryptor. |
[in] | encrypted_data | The buffer which stores the encrypted data. |
[in] | encrypted_data_len | The length of encrypted data, in bytes. |
FSDK.CustomSecurityCallback.FinishDecryptor | ( | decryptor | ) |
A callback function used to finish the decryption.
[in] | decryptor | The decryptor implemented and created by user, returned by callback function FSDK.CustomSecurityCallback.StartDecryptor. |
FSDK.CustomSecurityCallback.GetCipher | ( | context | ) |
A callback function used to get the cipher type.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
FSDK.CustomSecurityCallback.GetEncryptedSize | ( | context, | |
obj_num, | |||
gen_num, | |||
src_data, | |||
src_data_len | |||
) |
A callback function used to get the estimated encrypted size.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
[in] | obj_num | The object number for a PDF object. |
[in] | gen_num | The generation number for a PDF object. |
[in] | src_data | The buffer which stores the plain text to be encrypted. |
[in] | src_data_len | The length of the buffer. |
A callback function used to get encrypted data.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
[in] | obj_num | The object number for a PDF object. |
[in] | gen_num | The generation number for a PDF object. |
[in] | src_data | The buffer which stores the plain text to be encrypted. |
[in] | src_data_len | The length of the buffer. |
FSDK.CustomSecurityCallback.GetEncryptKey | ( | context | ) |
A callback function used to get the encryption key.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
A callback function used to get the estimated decrypted data size.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
[in] | src_data_size | Size of source data which is to be decrypted. |
FSDK.CustomSecurityCallback.IsOwner | ( | context | ) |
A callback function used to check if current user is the owner of the PDF document.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
FSDK.CustomSecurityCallback.ReleaseContext | ( | context | ) |
A callback function used to release the context for encryption and decryption.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
A callback function used to get the user permissions.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
[in] | user_permission | Original 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. |
FSDK.CustomSecurityCallback.StartDecryptor | ( | context | , |
obj_num | , | ||
gen_num | |||
) |
A callback function used to start a decryption.
[in] | context | The context for encryption and decryption, returned by callback function FSDK.CustomSecurityCallback.CreateContext. |
[in] | obj_num | The object number for a PDF object. |
[in] | gen_num | The generation number for a PDF object. |