org.icepdf.core.pobjects.security
Class CryptFilter
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.security.CryptFilter
public class CryptFilter
- extends Dictionary
PDF 1.5 introduces crypt filters, which provide finer granularity control of
encryption within a PDF file. The use of crypt filters involves the following
structures:
- The encryption dictionary (see Table 20) contains entries that enumerate
the crypt filters in the document (CF) and specify which ones are used by
default to decrypt all the streams (StmF) and strings (StrF) in the document.
In addition, the value of the V entry shall be 4 to use crypt filters.
- Each crypt filter specified in the CF entry of the encryption dictionary
shall be represented by a crypt filter dictionary, whose entries are shown
in Table 25.
- A stream filter type, the Crypt filter (see 7.4.10, "Crypt Filter")
can be specified for any stream in the document to override the default
filter for streams. A conforming reader shall provide a standard Identity
filter which shall pass the data unchanged (see Table 26) to allow specific
streams, such as document metadata, to be unencrypted in an otherwise
encrypted document. The stream's DecodeParms entry shall contain a
Crypt filter decode parameters dictionary (see Table 14) whose Name entry
specifies the particular crypt filter to be used (if missing, Identity is
used). Different streams may specify different crypt filters.
Authorization to decrypt a stream shall always be obtained before the stream
can be accessed. This typically occurs when the document is opened, as specified
by a value of DocOpen for the AuthEvent entry in the crypt filter dictionary.
Conforming readers and security handlers shall treat any attempt to access a
stream for which authorization has failed as an error. AuthEvent can also be
EFOpen, which indicates the presence of an embedded file that is encrypted
with a crypt filter that may be different from the crypt filters used by
default to encrypt strings and streams in the document.
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, 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 |
cryptFilters
public java.util.HashMap<Name,CryptFilterEntry> cryptFilters
CryptFilter
public CryptFilter(Library library,
java.util.Hashtable entries)
getCryptFilterByName
public CryptFilterEntry getCryptFilterByName(Name cryptFilterName)
- Gets a crypt filters definition as defined in its dictionary by name.
- Parameters:
cryptFilterName - name of crypt filter to find.
- Returns:
- crypt filter entry specified by the given name. if not found
null is returned.