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 PDFEncryptionJCE

    java.lang.Object
      org.apache.fop.pdf.PDFObject
          org.apache.fop.pdf.PDFEncryptionJCE

All Implemented Interfaces:
  PDFEncryption, PDFWritable

public class PDFEncryptionJCE
extends PDFObject
implements PDFEncryption

class representing a /Filter /Standard object.

Field Summary
`static int` | `PERMISSION_COPY_CONTENT` Value of content extraction permission
`static int` | `PERMISSION_EDIT_ANNOTATIONS` Value of annotation editting permission
`static int` | `PERMISSION_EDIT_CONTENT` Value of content editting permission
`static int` | `PERMISSION_PRINT` Value of PRINT permission

Fields inherited from class org.apache.fop.pdf.PDFObject
`DATE_FORMAT, log`

Constructor Summary
`PDFEncryptionJCE(int objnum)` Create a /Filter /Standard object.

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.
`byte[]` | `encryptData(byte[] data, int number, int generation)` This method encrypts the passed data using the generated keys.
`byte[]` | `getFileID()` Returns the document file ID
`java.lang.String` | `getFileID(int index)` This method returns the indexed file ID
`PDFEncryptionParams` | `getParams()` Returns the encryption parameters.
`java.lang.String` | `getTrailerEntry()` Returns the trailer entry for encryption.
`void` | `init()` This method initializes the encryption algorithms and values
`static PDFEncryption` | `make(int objnum, PDFEncryptionParams params)` Local factory method.
`PDFFilter` | `makeFilter(int number, int generation)` Creates PDFFilter for the encryption object
`void` | `setParams(PDFEncryptionParams params)` Sets the encryption parameters.
`byte[]` | `toPDF()` Represent the object in PDF

Methods inherited from class org.apache.fop.pdf.PDFObject
`contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDFString`

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

Field Detail

### PERMISSION_PRINT

    public static final int PERMISSION_PRINT

  Value of PRINT permission

  See Also:
    Constant Field Values

### PERMISSION_EDIT_CONTENT

    public static final int PERMISSION_EDIT_CONTENT

  Value of content editting permission

  See Also:
    Constant Field Values

### PERMISSION_COPY_CONTENT

    public static final int PERMISSION_COPY_CONTENT

  Value of content extraction permission

  See Also:
    Constant Field Values

### PERMISSION_EDIT_ANNOTATIONS

    public static final int PERMISSION_EDIT_ANNOTATIONS

  Value of annotation editting permission

  See Also:
    Constant Field Values

Constructor Detail

### PDFEncryptionJCE

    public PDFEncryptionJCE(int objnum)

  Create a /Filter /Standard object.

Parameters:
  `objnum` - the object's number

Method Detail

### make

    public static PDFEncryption make(int objnum,
                                     PDFEncryptionParams params)

  Local factory method.

  Parameters:
    `objnum` - PDF object number for the encryption object
    `params` - PDF encryption parameters
  Returns:
    PDFEncryption the newly created PDFEncryption object

### getParams

    public PDFEncryptionParams getParams()

  Returns the encryption parameters.

  Specified by:
    `getParams` in interface `PDFEncryption`
  Returns:
    the encryption parameters

### setParams

    public void setParams(PDFEncryptionParams params)

  Sets the encryption parameters.

  Specified by:
    `setParams` in interface `PDFEncryption`
  Parameters:
    `params` - The parameterss to set

### getFileID

    public byte[] getFileID()

  Returns the document file ID

  Returns:
    The file ID

### getFileID

    public java.lang.String getFileID(int index)

  This method returns the indexed file ID

  Parameters:
    `index` - The index to access the file ID
  Returns:
    The file ID

### init

    public void init()

  This method initializes the encryption algorithms and values

### encryptData

    public byte[] encryptData(byte[] data,
                              int number,
                              int generation)

  This method encrypts the passed data using the generated keys.

  Parameters:
    `data` - The data to be encrypted
    `number` - The block number
    `generation` - The block generation
  Returns:
    The encrypted data

### encrypt

    public byte[] encrypt(byte[] data,
                          PDFObject refObj)

  Encrypt an array of bytes using a reference PDFObject for calculating the encryption key.

  Specified by:
    `encrypt` in interface `PDFEncryption`
  Parameters:
    `data` - data to encrypt
    `refObj` - reference PDFObject
  Returns:
    byte[] the encrypted data

### makeFilter

    public PDFFilter makeFilter(int number,
                                int generation)

  Creates PDFFilter for the encryption object

  Parameters:
    `number` - The object number
    `generation` - The objects generation
  Returns:
    The resulting filter

### applyFilter

    public void applyFilter(AbstractPDFStream stream)

  Adds a PDFFilter to the PDFStream object

  Specified by:
    `applyFilter` in interface `PDFEncryption`
  Parameters:
    `stream` - the stream to add an encryption filter to

### toPDF

    public byte[] toPDF()

  Represent the object in PDF

  Overrides:
    `toPDF` in class `PDFObject`
  Returns:
    the PDF

### getTrailerEntry

    public java.lang.String getTrailerEntry()

  Returns the trailer entry for encryption.

  Specified by:
    `getTrailerEntry` in interface `PDFEncryption`
  Returns:
    the trailer entry

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.