Package org.verapdf.pd.encryption
Class PDEncryption
java.lang.Object
org.verapdf.pd.PDObject
org.verapdf.pd.encryption.PDEncryption
Represents encryption dictionary on PD level.
- Author:
- Sergey Shemyakov
-
Constructor Summary
-
Method Summary
Methods inherited from class org.verapdf.pd.PDObject
clear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getNameKeyStringValue, getObject, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObject
-
Constructor Details
-
PDEncryption
Constructor from encryption dictionary.- Parameters:
obj
- is encryption dictionary.
-
PDEncryption
public PDEncryption()
-
-
Method Details
-
getFilter
- Returns:
- the name of the preferred security handler for this document.
-
getSubFilter
- Returns:
- a name that completely specifies the format and interpretation of the contents of the encryption dictionary.
-
getUserPermissions
-
getV
public int getV()- Returns:
- a code specifying the algorithm to be used in encrypting and decrypting the document.
-
getLength
public int getLength()- Returns:
- the length of the encryption key, in bits.
-
getR
- Returns:
- a number specifying revision of the standard security handler.
-
getO
- Returns:
- O string from encryption dictionary.
-
getU
- Returns:
- U string from encryption dictionary.
-
getP
- Returns:
- integer that is a set of flags specifying which operations can be performed when document is opened with user access.
-
getOE
- Returns:
- value of OE key, as described in PDF-2.0 specification.
-
getUE
- Returns:
- value of UE key, as described in PDF-2.0 specification.
-
isEncryptMetadata
public boolean isEncryptMetadata()- Returns:
- true if document-level metadata stream shall be be encrypted.
-
getStandardCryptFilter
- Returns:
- standard crypt filter for standard security handler of revision 4.
-
getCryptFilter
Gets crypt filter with given name.- Parameters:
cfName
- is name for crypt filter.- Returns:
- crypt filter for this name taken from encryption dictionary CF dict.
-