java.lang.Object
org.sejda.sambox.pdmodel.encryption.SecurityHandler
org.sejda.sambox.pdmodel.encryption.PublicKeySecurityHandler
This class implements the public key security handler described in the PDF specification.
- Author:
- Benoit Guillon
- See Also:
-
Field Summary
FieldsFields inherited from class org.sejda.sambox.pdmodel.encryption.SecurityHandler
keyLength -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor used for encryption. -
Method Summary
Modifier and TypeMethodDescriptionvoidprepareForDecryption(PDEncryption encryption, COSArray documentIDArray, DecryptionMaterial decryptionMaterial) Prepares everything to decrypt the document.Methods inherited from class org.sejda.sambox.pdmodel.encryption.SecurityHandler
decrypt, decryptDataRC4, decryptDataRC4, decryptStream, getCurrentAccessPermission, getEncryptionKey, getKeyLength, isAES, isDecryptMetadata, setAES, setCurrentAccessPermission, setDecryptMetadata, setEncryptionKey, setKeyLength, setStreamFilterName, setStringFilterName
-
Field Details
-
FILTER
The filter name.- See Also:
-
-
Constructor Details
-
PublicKeySecurityHandler
public PublicKeySecurityHandler()Constructor. -
PublicKeySecurityHandler
Constructor used for encryption.- Parameters:
p- The protection policy.
-
-
Method Details
-
prepareForDecryption
public void prepareForDecryption(PDEncryption encryption, COSArray documentIDArray, DecryptionMaterial decryptionMaterial) throws IOException Prepares everything to decrypt the document.- Specified by:
prepareForDecryptionin classSecurityHandler- Parameters:
encryption- encryption dictionary, can be retrieved viaPDDocument.getEncryption()documentIDArray- document id which is returned viaCOSDocument.getDocumentID()(not used by this handler)decryptionMaterial- Information used to decrypt the document.- Throws:
IOException- If there is an error accessing data. If verbose mode is enabled, the exception message will provide more details why the match wasn't successful.
-