PDFEncryptor
Overview
PDFEncryptor is a class in Aspose.PDF FOSS for Java.
Encrypts individual PDF objects (strings and streams).
This class provides 5 methods for working with PDFEncryptor objects in Java programs.
Available methods include: PDFEncryptor, encrypt, getCustomHandler, isActive.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: active, customHandler.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
active | boolean | Read | Returns true if the encryptor has a valid key. |
customHandler | ICustomSecurityHandler | Read | Returns the custom handler used by this encryptor, if any. |
Methods
| Signature | Description |
|---|---|
PDFEncryptor(encryptionKey: byte[], encDict: PDFEncryptionDict) | Creates an encryptor with the given key and encryption parameters. |
PDFEncryptor(encryptionKey: byte[], encDict: PDFEncryptionDict, customHandler: ICustomSecurityHandler) | Creates an encryptor backed by a custom security handler. |
encrypt(data: byte[], objectNumber: int, generationNumber: int) → byte[] | Encrypts data belonging to a specific PDF object. |
isActive() → boolean | Returns true if the encryptor has a valid key. |
getCustomHandler() → ICustomSecurityHandler | Returns the custom handler used by this encryptor, if any. |