org.apache.fop.pdf

Interface PDFEncryption

Known Implementing Classes:
PDFEncryptionJCE

public interface PDFEncryption

This interface defines the contract for classes implementing PDF encryption.

Method Summary

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.
PDFEncryptionParams
getParams()
Returns the encryption parameters.
String
getTrailerEntry()
Returns the trailer entry for encryption.
void
setParams(PDFEncryptionParams params)
Sets the encryption parameters.

Method Details

applyFilter

public void applyFilter(AbstractPDFStream stream)
Adds a PDFFilter to the PDFStream object
Parameters:
stream - the stream to add an encryption filter to

encrypt

public byte[] encrypt(byte[] data,
                      PDFObject refObj)
Encrypt an array of bytes using a reference PDFObject for calculating the encryption key.
Parameters:
data - data to encrypt
refObj - reference PDFObject
Returns:
byte[] the encrypted data

getParams

public PDFEncryptionParams getParams()
Returns the encryption parameters.
Returns:
the encryption parameters

getTrailerEntry

public String getTrailerEntry()
Returns the trailer entry for encryption.
Returns:
the trailer entry

setParams

public void setParams(PDFEncryptionParams params)
Sets the encryption parameters.
Parameters:
params - The parameterss to set

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.