Package org.apache.fop.pdf
Interface PDFEncryption
-
- All Known Implementing Classes:
PDFEncryptionJCE
public interface PDFEncryptionThis interface defines the contract for classes implementing PDF encryption.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyFilter(AbstractPDFStream stream)Adds a PDFFilter to the PDFStream objectbyte[]encrypt(byte[] data, PDFObject refObj)Encrypt an array of bytes using a reference PDFObject for calculating the encryption key.VersiongetPDFVersion()Returns the PDF version required by the current encryption algorithm.java.lang.StringgetTrailerEntry()Returns the /Encrypt entry in the file trailer dictionary.
-
-
-
Method Detail
-
applyFilter
void applyFilter(AbstractPDFStream stream)
Adds a PDFFilter to the PDFStream object- Parameters:
stream- the stream to add an encryption filter to
-
encrypt
byte[] encrypt(byte[] data, PDFObject refObj)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
java.lang.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
-
-