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 java.lang.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, setKeyLength
public static final java.lang.String FILTER
public PublicKeySecurityHandler()
public PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
p
- The protection policy.public void decryptDocument(PDDocument doc, DecryptionMaterial decryptionMaterial) throws CryptographyException, java.io.IOException
decryptDocument
in class SecurityHandler
doc
- The document to decrypt.decryptionMaterial
- The data used to decrypt the document.CryptographyException
- If there is an error during decryption.java.io.IOException
- If there is an error accessing data.public void prepareDocumentForEncryption(PDDocument doc) throws CryptographyException
prepareDocumentForEncryption
in class SecurityHandler
doc
- The document that will be encrypted.CryptographyException
- If there is an error while encrypting.