|
Foxit PDF SDK
|
Public 成员函数 | |
| CustomSecurityHandler () | |
| 构造函数。 | |
| CustomSecurityHandler (SecurityHandler other) | |
| 构造函数,使用父类对象。 更多... | |
| synchronized void | delete () |
| 直接清除C++相关资源。 更多... | |
| boolean | initialize (CustomEncryptData encrypt_data, CustomSecurityCallback callback, String encrypt_info) throws com.foxit.sdk.PDFException |
| 初始化当前自定义安全处理器。 更多... | |
Public 成员函数 继承自 com.foxit.sdk.pdf.SecurityHandler | |
| SecurityHandler () | |
| 构造函数。 | |
| SecurityHandler (SecurityHandler other) | |
| 用另一个安全处理器对象的构造函数。 更多... | |
| int | getSecurityType () |
| 获取当前安全处理器的加密类型。 更多... | |
| boolean | isEmpty () |
| 检查当前对象是否为空。 更多... | |
额外继承的成员函数 | |
静态 Public 属性 继承自 com.foxit.sdk.pdf.SecurityHandler | |
| static final int | e_CipherAES = 2 |
| 使用AES加密算法,密钥长度为16字节(AES-128)或 32字节(AES-256,仅在PDF 2.0中支持)。 | |
| static final int | e_CipherNone = 0 |
| 不使用加密算法。 | |
| static final int | e_CipherRC4 = 1 |
| 使用RC4加密算法,密钥长度在5字节到16字节之间。 | |
此类表示自定义安全处理器,用于自定义加密。
| com.foxit.sdk.pdf.CustomSecurityHandler.CustomSecurityHandler | ( | SecurityHandler | other | ) |
构造函数,使用父类对象。
| [in] | other | 父类对象。 |
| synchronized void com.foxit.sdk.pdf.CustomSecurityHandler.delete | ( | ) |
| boolean com.foxit.sdk.pdf.CustomSecurityHandler.initialize | ( | CustomEncryptData | encrypt_data, |
| CustomSecurityCallback | callback, | ||
| String | encrypt_info | ||
| ) | throws com.foxit.sdk.PDFException |
初始化当前自定义安全处理器。
如果此函数成功,Foxit PDF SDK将接管输入的安全回调对象,用户不应再直接释放此回调对象;否则稍后可能发生意外崩溃。
Foxit PDF SDK可能通过回调函数 SecurityCallback.release 释放安全回调对象,当当前安全处理器被释放且发现回调对象未被其他对象使用时。因此,建议用户在当前安全处理器被释放后不再使用安全回调对象。
| [in] | encrypt_data | 自定义加密数据对象。 |
| [in] | callback | 有效的 CustomSecurityCallback 对象,由用户继承并实现用于自己的加密和描述算法。不应为 null。 |
| [in] | encrypt_info | 加密信息,将存储到文档加密字典中。可以是空字符串。默认值:空字符串。 |