public final class PDFEncryptionJCE extends PDFObject implements PDFEncryption
| Modifier and Type | Method and Description |
|---|---|
void |
applyFilter(AbstractPDFStream stream)
Adds a PDFFilter to the PDFStream object
|
byte[] |
encrypt(byte[] data,
PDFObject refObj)
Encrypt an array of bytes using a reference PDFObject for calculating
the encryption key.
|
Version |
getPDFVersion()
Returns the PDF version required by the current encryption algorithm.
|
java.lang.String |
getTrailerEntry()
Returns the /Encrypt entry in the file trailer dictionary.
|
static PDFEncryption |
make(PDFObjectNumber objectNumber,
PDFEncryptionParams params,
PDFDocument pdf)
Creates and returns an encryption object.
|
byte[] |
toPDF()
Prepares the encryption dictionary for output to a PDF file.
|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFStringpublic static PDFEncryption make(PDFObjectNumber objectNumber, PDFEncryptionParams params, PDFDocument pdf)
objectNumber - the object number for the encryption dictionaryparams - the encryption parameterspdf - the PDF document to be encryptedpublic byte[] encrypt(byte[] data,
PDFObject refObj)
encrypt in interface PDFEncryptiondata - data to encryptrefObj - reference PDFObjectpublic void applyFilter(AbstractPDFStream stream)
applyFilter in interface PDFEncryptionstream - the stream to add an encryption filter topublic byte[] toPDF()
public java.lang.String getTrailerEntry()
getTrailerEntry in interface PDFEncryptionpublic Version getPDFVersion()
getPDFVersion in interface PDFEncryptionCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.