public class PublicKeySecurityHandler extends SecurityHandler
Spec 1.6 p104,
to see how to protect document with this security handler.| Modifier and Type | Field and Description |
|---|---|
static String |
FILTER
The filter name.
|
currentAccessPermission, document, encryptionKey, keyLength, rc4, version| Constructor and Description |
|---|
PublicKeySecurityHandler()
Constructor.
|
PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
Constructor used for encryption.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decryptDocument(PDDocument doc,
DecryptionMaterial decryptionMaterial)
Decrypt the document.
|
void |
prepareDocumentForEncryption(PDDocument doc)
Prepare the document for encryption.
|
decryptStream, decryptString, encryptData, encryptData, encryptStream, getCurrentAccessPermission, getKeyLength, isAES, proceedDecryption, setAES, setKeyLengthpublic static final String FILTER
public PublicKeySecurityHandler()
public PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
p - The protection policy.public void decryptDocument(PDDocument doc, DecryptionMaterial decryptionMaterial) throws CryptographyException, IOException
decryptDocument in class SecurityHandlerdoc - The document to decrypt.decryptionMaterial - The data used to decrypt the document.CryptographyException - If there is an error during decryption.IOException - If there is an error accessing data.public void prepareDocumentForEncryption(PDDocument doc) throws CryptographyException
prepareDocumentForEncryption in class SecurityHandlerdoc - The document that will be encrypted.CryptographyException - If there is an error while encrypting.Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.