Foxit PDF SDK
|
Public Member Functions | |
def | CreateContext (filter, sub_filter, encrypt_info) |
A callback function used to create context for encryption and decryption. More... | |
def | DecryptData (decryptor, encrypted_data, encrypted_data_len) |
A callback function used to decrypt the encrypted data. More... | |
def | EncryptData (context, obj_num, gen_num, src_data, src_data_len, out_dst_buffer, out_dst_buffer_len) |
A callback function used to get encrypted data. More... | |
def | FinishDecryptor (decryptor) |
A callback function used to finish the decryption. More... | |
def | GetCipher (context) |
A callback function used to get the cipher type. More... | |
def | GetDecryptedSize (context, src_data_size) |
A callback function used to get the estimated decrypted data size. More... | |
def | GetEncryptedSize (context, obj_num, gen_num, src_data, src_data_len) |
A callback function used to get the estimated encrypted size. More... | |
def | GetEncryptKey (context) |
A callback function used to get the encryption key. More... | |
def | GetSecurityType () |
Get the encryption type of security callback. More... | |
def | GetUserPermissions (context, user_permission) |
A callback function used to get the user permissions. More... | |
def | IsOwner (context) |
A callback function used to check if current user is the owner of the PDF document. More... | |
def | ReleaseContext (context) |
A callback function used to release the context for encryption and decryption. More... | |
def | StartDecryptor (context, obj_num, gen_num) |
A callback function used to start a decryption. More... | |
def | UseStandardCryptoMethod (context) |
A callback function to check if to use standard crypto method or custom crypto method. More... | |
![]() | |
def | Release () |
A callback function used to release current callback object itself. 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 FoxitPDFSDKPython3.Library.RegisterSecurityCallback with with any custom filter name (following the PDF name conventions). Function FoxitPDFSDKPython3.Library.UnregisterSecurityCallback can be called to unregister the security callback object with the registered filter name.
def FoxitPDFSDKPython3.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. |
def FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.CustomSecurityCallback.StartDecryptor . |
[in] | encrypted_data | The buffer which stores the encrypted data. |
[in] | encrypted_data_len | The length of encrypted data, in bytes. |
def FoxitPDFSDKPython3.CustomSecurityCallback.EncryptData | ( | context, | |
obj_num, | |||
gen_num, | |||
src_data, | |||
src_data_len, | |||
out_dst_buffer, | |||
out_dst_buffer_len | |||
) |
A callback function used to get encrypted data.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.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. |
[out] | out_dst_buffer | Output parameter that receives the encrypted content. |
[out] | out_dst_buffer_len | Output parameter that receives the length of the encrypted data. |
def FoxitPDFSDKPython3.CustomSecurityCallback.FinishDecryptor | ( | decryptor | ) |
A callback function used to finish the decryption.
[in] | decryptor | The decryptor implemented and created by user, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.StartDecryptor . |
def FoxitPDFSDKPython3.CustomSecurityCallback.GetCipher | ( | context | ) |
A callback function used to get the cipher type.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
def FoxitPDFSDKPython3.CustomSecurityCallback.GetDecryptedSize | ( | context, | |
src_data_size | |||
) |
A callback function used to get the estimated decrypted data size.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
[in] | src_data_size | Size of source data which is to be decrypted. |
def FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.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. |
def FoxitPDFSDKPython3.CustomSecurityCallback.GetEncryptKey | ( | context | ) |
A callback function used to get the encryption key.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
def FoxitPDFSDKPython3.CustomSecurityCallback.GetSecurityType | ( | ) |
Get the encryption type of security callback.
Reimplemented from FoxitPDFSDKPython3.SecurityCallback.
Reimplemented in FoxitPDFSDKPython3.RMSSecurityCallback.
def FoxitPDFSDKPython3.CustomSecurityCallback.GetUserPermissions | ( | context, | |
user_permission | |||
) |
A callback function used to get the user permissions.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
[in] | user_permission | Original permission settings of the document. Please refer to values starting from FoxitPDFSDKPython3.PDFDoc.e_PermPrint and this would be one or combination of these values. |
def FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
def FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
def FoxitPDFSDKPython3.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 FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
[in] | obj_num | The object number for a PDF object. |
[in] | gen_num | The generation number for a PDF object. |
def FoxitPDFSDKPython3.CustomSecurityCallback.UseStandardCryptoMethod | ( | context | ) |
A callback function to check if to use standard crypto method or custom crypto method.
[in] | context | The context for encryption and decryption, returned by callback function FoxitPDFSDKPython3.CustomSecurityCallback.CreateContext . |
<ul> <li> <b>true</b> means to use standard crypto method. In this case, callback functions @link FoxitPDFSDKPython3::CustomSecurityCallback::GetDecryptedSize FoxitPDFSDKPython3.CustomSecurityCallback.GetDecryptedSize @endlink, @link FoxitPDFSDKPython3::CustomSecurityCallback::StartDecryptor FoxitPDFSDKPython3.CustomSecurityCallback.StartDecryptor @endlink, @link FoxitPDFSDKPython3::CustomSecurityCallback::DecryptData FoxitPDFSDKPython3.CustomSecurityCallback.DecryptData @endlink, @link FoxitPDFSDKPython3::CustomSecurityCallback::FinishDecryptor FoxitPDFSDKPython3.CustomSecurityCallback.FinishDecryptor @endlink, @link FoxitPDFSDKPython3::CustomSecurityCallback::GetEncryptedSize FoxitPDFSDKPython3.CustomSecurityCallback.GetEncryptedSize @endlink, and @link FoxitPDFSDKPython3::CustomSecurityCallback::EncryptData FoxitPDFSDKPython3.CustomSecurityCallback.EncryptData @endlink will be uselss and user can just use empty implementation for them. </li> <li> <b>false</b> means use custom crypto method. In this case, please ensure callback functions mentioned above have all been implemented. </li> </ul>