Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.pdf
Class PDFEncryptionManager

    java.lang.Object
      org.apache.fop.pdf.PDFEncryptionManager

public class PDFEncryptionManager
extends java.lang.Object

This class acts as a factory for PDF encryption support. It enables the feature to be optional to FOP depending on the availability of JCE.

Field Summary
`protected static org.apache.commons.logging.Log` | `log` logging instance

Constructor Summary
`PDFEncryptionManager()`

Method Summary
`static boolean` | `checkAvailableAlgorithms()` Checks whether the necessary algorithms are available.
`static boolean` | `isJCEAvailable()` Indicates whether JCE is available.
`static PDFEncryption` | `newInstance(int objnum, PDFEncryptionParams params)` Creates a new PDFEncryption instance if PDF encryption is available.
`static void` | `setupPDFEncryption(PDFEncryptionParams params, PDFDocument pdf)` Sets up PDF encryption if PDF encryption is requested by registering a `PDFEncryptionParams` object with the user agent and if the necessary cryptographic support is available.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static org.apache.commons.logging.Log log

  logging instance

Constructor Detail

### PDFEncryptionManager

    public PDFEncryptionManager()

Method Detail

### isJCEAvailable

    public static boolean isJCEAvailable()

  Indicates whether JCE is available.

  Returns:
    boolean true if JCE is present

### checkAvailableAlgorithms

    public static boolean checkAvailableAlgorithms()

  Checks whether the necessary algorithms are available.

  Returns:
    boolean True if all necessary algorithms are present

### setupPDFEncryption

    public static void setupPDFEncryption(PDFEncryptionParams params,
                                          PDFDocument pdf)

  Sets up PDF encryption if PDF encryption is requested by registering a `PDFEncryptionParams` object with the user agent and if the necessary cryptographic support is available.

  Parameters:
    `params` - the PDF encryption params or null to disable encryption
    `pdf` - the PDF document to setup encryption for

### newInstance

    public static PDFEncryption newInstance(int objnum,
                                            PDFEncryptionParams params)

  Creates a new PDFEncryption instance if PDF encryption is available.

  Parameters:
    `objnum` - PDF object number
    `params` - PDF encryption parameters
  Returns:
    PDFEncryption the newly created instance, null if PDF encryption is unavailable.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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