Package org.apache.fop.pdf
Interface PDFEncryption
- All Known Implementing Classes:
PDFEncryptionJCE
public interface PDFEncryption
This interface defines the contract for classes implementing PDF encryption.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyFilter
(AbstractPDFStream stream) Adds a PDFFilter to the PDFStream objectbyte[]
Encrypt an array of bytes using a reference PDFObject for calculating the encryption key.Returns the PDF version required by the current encryption algorithm.Returns the /Encrypt entry in the file trailer dictionary.
-
Method Details
-
applyFilter
Adds a PDFFilter to the PDFStream object- Parameters:
stream
- the stream to add an encryption filter to
-
encrypt
Encrypt an array of bytes using a reference PDFObject for calculating the encryption key.- Parameters:
data
- data to encryptrefObj
- reference PDFObject- Returns:
- byte[] the encrypted data
-
getTrailerEntry
String getTrailerEntry()Returns the /Encrypt entry in the file trailer dictionary.- Returns:
- the string "/Encrypt n g R\n" where n and g are the number and generation of the document's encryption dictionary
-
getPDFVersion
Version getPDFVersion()Returns the PDF version required by the current encryption algorithm.- Returns:
- the PDF Version
-