PDFEncryption
, PDFWritable
public final class PDFEncryptionJCE extends PDFObject implements PDFEncryption
Modifier and Type | Method | 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFString
public 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 PDFEncryption
data
- data to encryptrefObj
- reference PDFObjectpublic void applyFilter(AbstractPDFStream stream)
applyFilter
in interface PDFEncryption
stream
- the stream to add an encryption filter topublic byte[] toPDF()
public java.lang.String getTrailerEntry()
getTrailerEntry
in interface PDFEncryption
public Version getPDFVersion()
getPDFVersion
in interface PDFEncryption
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.