Class PDCryptFilterDictionary
java.lang.Object
org.apache.pdfbox.pdmodel.encryption.PDCryptFilterDictionary
This class is a specialized view of the crypt filter dictionary of a PDF document.
It contains a low level dictionary (COSDictionary) and provides the methods to
manage its fields.
- Version:
- $Revision: 1.0 $
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptioncreates a new empty crypt filter dictionary.creates a new crypt filter dictionary from the low level dictionary provided. -
Method Summary
Modifier and TypeMethodDescriptionThis will get the dictionary associated with this crypt filter dictionary.This will return the crypt filter method.int
This will return the Length entry of the crypt filter dictionary.
The length in bits for the crypt filter algorithm.void
This will set the crypt filter method.void
setLength
(int length) This will set the number of bits to use for the crypt filter algorithm.
-
Field Details
-
cryptFilterDictionary
COS crypt filter dictionary.
-
-
Constructor Details
-
PDCryptFilterDictionary
public PDCryptFilterDictionary()creates a new empty crypt filter dictionary. -
PDCryptFilterDictionary
creates a new crypt filter dictionary from the low level dictionary provided.- Parameters:
d
- the low level dictionary that will be managed by the newly created object
-
-
Method Details
-
getCOSDictionary
This will get the dictionary associated with this crypt filter dictionary.- Returns:
- The COS dictionary that this object wraps.
-
setLength
public void setLength(int length) This will set the number of bits to use for the crypt filter algorithm.- Parameters:
length
- The new key length.
-
getLength
public int getLength()This will return the Length entry of the crypt filter dictionary.
The length in bits for the crypt filter algorithm. This will return a multiple of 8.- Returns:
- The length in bits for the encryption algorithm
-
setCryptFilterMethod
This will set the crypt filter method. Allowed values are: NONE, V2, AESV2- Parameters:
cfm
- name of the crypt filter method.- Throws:
IOException
- If there is an error setting the data.
-
getCryptFilterMethod
This will return the crypt filter method. Allowed values are: NONE, V2, AESV2- Returns:
- the name of the crypt filter method.
- Throws:
IOException
- If there is an error accessing the data.
-