Interface DecryptedState
-
- All Superinterfaces:
java.io.Serializable
public interface DecryptedState extends java.io.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getEncryptKey()
Get encryption key when no crypt filter is usedbyte[]
getEncryptKey(java.lang.String cryptFilter)
Get encryption key corresponding to a cryptfilterjava.lang.Integer
getPerms()
Get perms flagSecurityManager
getSecurityManager(CosDocument cosDocument)
Get security manager for this decrypted state.void
setEncryptKey(byte[] encryptKey)
Set encryption key when no crypt filter is usedvoid
setEncryptKey(java.lang.String cryptFilter, byte[] encryptKey)
Set encryption key corresponding to a cryptfiltervoid
setPerms(java.lang.Integer mPerms)
Set perms flag
-
-
-
Method Detail
-
getEncryptKey
byte[] getEncryptKey()
Get encryption key when no crypt filter is used- Returns:
- byte[]
-
getEncryptKey
byte[] getEncryptKey(java.lang.String cryptFilter)
Get encryption key corresponding to a cryptfilter- Returns:
- byte[]
-
setEncryptKey
void setEncryptKey(java.lang.String cryptFilter, byte[] encryptKey)
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
void setPerms(java.lang.Integer mPerms)
Set perms flag- Parameters:
mPerms
-
-
getPerms
java.lang.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 ownSecurityManager
which will ensure that state information in this class is correctly used while decrypting.- Parameters:
cosDocument
-- Returns:
- SecurityManager
- Throws:
PDFSecurityConfigurationException
PDFSecurityAuthorizationException
PDFCosParseException
PDFIOException
PDFSecurityException
-
-