org.icepdf.core.pobjects.security
Class CryptFilterEntry

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.security.CryptFilterEntry

public class CryptFilterEntry
extends Dictionary

Individual Crypt filter definition. A filter is associated with a name key in the CryptFilter definition. A stream or string that uses a crypt filter will references it by its name.


Field Summary
static Name AUTHEVENT_KEY
           
static Name CFM_KEY
           
static Name LENGTH_KEY
           
static Name TYPE
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
CryptFilterEntry(Library library, java.util.HashMap entries)
           
 
Method Summary
 Name getAuthEvent()
          The event to be used to trigger the authorization that is required to access encryption keys used by this filter.
 Name getCryptFilterMethod()
          The method used, if any, by the conforming reader to decrypt data.
 int getLength()
          (Optional) The bit length of the encryption key.
 Name getType()
          If present, shall be CryptFilter for a crypt filter dictionary.
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final Name TYPE

AUTHEVENT_KEY

public static final Name AUTHEVENT_KEY

CFM_KEY

public static final Name CFM_KEY

LENGTH_KEY

public static final Name LENGTH_KEY
Constructor Detail

CryptFilterEntry

public CryptFilterEntry(Library library,
                        java.util.HashMap entries)
Method Detail

getType

public Name getType()
If present, shall be CryptFilter for a crypt filter dictionary.

Returns:
dictionary type, CryptFilter

getCryptFilterMethod

public Name getCryptFilterMethod()
The method used, if any, by the conforming reader to decrypt data. The following values shall be supported:

When the value is V2 or AESV2, the application may ask once for this encryption key and cache the key for subsequent use for streams that use the same crypt filter. Therefore, there shall be a one-to-one relationship between a crypt filter name and the corresponding encryption key.

Only the values listed here shall be supported. Applications that encounter other values shall report that the file is encrypted with an unsupported algorithm.

Default value: None.

Returns:
name of crypt filter method.

getAuthEvent

public Name getAuthEvent()
The event to be used to trigger the authorization that is required to access encryption keys used by this filter. If authorization fails, the event shall fail. Valid values shall be: Default value: DocOpen.

If this filter is used as the value of StrF or StmF in the encryption dictionary (see Table 20), the conforming reader shall ignore this key and behave as if the value is DocOpen.

Returns:
authorization event.

getLength

public int getLength()
(Optional) The bit length of the encryption key. It shall be a multiple of 8 in the range of 40 to 128. Security handlers may define their own use of the Length entry and should use it to define the bit length of the encryption key. Standard security handler expresses the length in multiples of 8 (16 means 128) and public-key security handler expresses it as is (128 means 128).

Returns:
lenth of encryption key