Package com.pd4ml.pdf.encryption
Class PublicKeySecurityHandler
- java.lang.Object
- 
- com.pd4ml.pdf.encryption.SecurityHandler<PublicKeyProtectionPolicy>
- 
- com.pd4ml.pdf.encryption.PublicKeySecurityHandler
 
 
- 
 public final class PublicKeySecurityHandler extends SecurityHandler<PublicKeyProtectionPolicy> This class implements the public key security handler described in the PDF specification.- Author:
- Benoit Guillon
- See Also:
- to see how to protect document with this security handler.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringFILTERThe filter name.
 - 
Constructor SummaryConstructors Constructor Description PublicKeySecurityHandler()Constructor.PublicKeySecurityHandler(PublicKeyProtectionPolicy publicKeyProtectionPolicy)Constructor used for encryption.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprepareDocumentForEncryption(PDEncryption dictionary, byte[] documentID)Prepare the document for encryption.voidprepareForDecryption(PDEncryption encryption, byte[] documentIDBytes, DecryptionMaterial decryptionMaterial)Prepares everything to decrypt the document.- 
Methods inherited from class com.pd4ml.pdf.encryption.SecurityHandlerdecryptBuffer, getCurrentAccessPermission, getEncryptionKey, getKeyLength, hasProtectionPolicy, isAES, isDecryptMetadata, setAES, setCurrentAccessPermission, setCustomSecureRandom, setEncryptionKey, setKeyLength, setParams
 
- 
 
- 
- 
- 
Field Detail- 
FILTERpublic static final java.lang.String FILTER The filter name.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
PublicKeySecurityHandlerpublic PublicKeySecurityHandler() Constructor.
 - 
PublicKeySecurityHandlerpublic PublicKeySecurityHandler(PublicKeyProtectionPolicy publicKeyProtectionPolicy) Constructor used for encryption.- Parameters:
- publicKeyProtectionPolicy- The protection policy.
 
 
- 
 - 
Method Detail- 
prepareForDecryptionpublic void prepareForDecryption(PDEncryption encryption, byte[] documentIDBytes, DecryptionMaterial decryptionMaterial) throws java.io.IOException Prepares everything to decrypt the document.- Specified by:
- prepareForDecryptionin class- SecurityHandler<PublicKeyProtectionPolicy>
- Parameters:
- encryption- encryption dictionary
- documentIDBytes- document id bytes (not used by this handler)
- decryptionMaterial- Information used to decrypt the document.
- Throws:
- java.io.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.
 
 - 
prepareDocumentForEncryptionpublic void prepareDocumentForEncryption(PDEncryption dictionary, byte[] documentID) throws java.io.IOException Prepare the document for encryption.- Specified by:
- prepareDocumentForEncryptionin class- SecurityHandler<PublicKeyProtectionPolicy>
- Parameters:
- dictionary- encryption dictionary
- documentID- document ID bytes
- Throws:
- java.io.IOException- If there is an error while encrypting.
 
 
- 
 
-