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

NameTypeAccessDescription
activebooleanReadReturns true if the encryptor has a valid key.
customHandlerICustomSecurityHandlerReadReturns the custom handler used by this encryptor, if any.

Methods

SignatureDescription
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()booleanReturns true if the encryptor has a valid key.
getCustomHandler()ICustomSecurityHandlerReturns the custom handler used by this encryptor, if any.

See Also

 English