Package org.verapdf.pd.encryption
Class PDEncryption
- java.lang.Object
-
- org.verapdf.pd.PDObject
-
- org.verapdf.pd.encryption.PDEncryption
-
public class PDEncryption extends PDObject
Represents encryption dictionary on PD level.- Author:
- Sergey Shemyakov
-
-
Constructor Summary
Constructors Constructor Description PDEncryption()PDEncryption(COSObject obj)Constructor from encryption dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDCryptFiltergetCryptFilter(ASAtom cfName)Gets crypt filter with given name.ASAtomgetFilter()intgetLength()COSStringgetO()COSStringgetOE()LonggetP()LonggetR()PDCryptFiltergetStandardCryptFilter()ASAtomgetSubFilter()COSStringgetU()COSStringgetUE()AccessPermissionsgetUserPermissions()intgetV()booleanisEncryptMetadata()-
Methods inherited from class org.verapdf.pd.PDObject
clear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getObject, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObject
-
-
-
-
Constructor Detail
-
PDEncryption
public PDEncryption(COSObject obj)
Constructor from encryption dictionary.- Parameters:
obj- is encryption dictionary.
-
PDEncryption
public PDEncryption()
-
-
Method Detail
-
getFilter
public ASAtom getFilter()
- Returns:
- the name of the preferred security handler for this document.
-
getSubFilter
public ASAtom getSubFilter()
- Returns:
- a name that completely specifies the format and interpretation of the contents of the encryption dictionary.
-
getUserPermissions
public AccessPermissions 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
public Long getR()
- Returns:
- a number specifying revision of the standard security handler.
-
getO
public COSString getO()
- Returns:
- O string from encryption dictionary.
-
getU
public COSString getU()
- Returns:
- U string from encryption dictionary.
-
getP
public Long getP()
- Returns:
- integer that is a set of flags specifying which operations can be performed when document is opened with user access.
-
getOE
public COSString getOE()
- Returns:
- value of OE key, as described in PDF-2.0 specification.
-
getUE
public COSString 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
public PDCryptFilter getStandardCryptFilter()
- Returns:
- standard crypt filter for standard security handler of revision 4.
-
getCryptFilter
public PDCryptFilter getCryptFilter(ASAtom cfName)
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.
-
-