Interface DecryptedState
- All Superinterfaces:
Serializable
This interface represents the security state of an unlocked document. Clients can get
this state from unlocked PDFDocument objects.
This state information can be used to decrypt unlocked PDFDocument without need
for entering user password or credential information.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get encryption key when no crypt filter is usedbyte[]getEncryptKey(String cryptFilter) Get encryption key corresponding to a cryptfiltergetPerms()Get perms flaggetSecurityManager(CosDocument cosDocument) Get security manager for this decrypted state.voidsetEncryptKey(byte[] encryptKey) Set encryption key when no crypt filter is usedvoidsetEncryptKey(String cryptFilter, byte[] encryptKey) Set encryption key corresponding to a cryptfiltervoidSet perms flag
-
Method Details
-
getEncryptKey
byte[] getEncryptKey()Get encryption key when no crypt filter is used- Returns:
- byte[]
-
getEncryptKey
Get encryption key corresponding to a cryptfilter- Returns:
- byte[]
-
setEncryptKey
Set encryption key corresponding to a cryptfilter- Parameters:
cryptFilter- Crypt filterencryptKey- byte array representing encryption key
-
setEncryptKey
void setEncryptKey(byte[] encryptKey) Set encryption key when no crypt filter is used- Parameters:
encryptKey- byte array representing encryption key
-
setPerms
Set perms flag- Parameters:
mPerms-
-
getPerms
Integer getPerms()Get perms flag- Returns:
- Integer
-
getSecurityManager
SecurityManager getSecurityManager(CosDocument cosDocument) throws PDFSecurityConfigurationException, PDFSecurityAuthorizationException, PDFCosParseException, PDFIOException, PDFSecurityException Get security manager for this decrypted state. For new implementations ofDecryptedState, clients need to return their ownSecurityManagerwhich will ensure that state information in this class is correctly used while decrypting.- Parameters:
cosDocument-- Returns:
- SecurityManager
- Throws:
PDFSecurityConfigurationExceptionPDFSecurityAuthorizationExceptionPDFCosParseExceptionPDFIOExceptionPDFSecurityException
-