Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.pdfbox.pdmodel.encryption.SecurityHandler
org.pdfbox.pdmodel.encryption.PublicKeySecurityHandler
public class PublicKeySecurityHandler
extends SecurityHandler
Spec 1.6 p104
, to see how to protect document with this security handler.
Field Summary | |
static String |
|
Fields inherited from class org.pdfbox.pdmodel.encryption.SecurityHandler | |
currentAccessPermission , document , encryptionKey , keyLength , rc4 , version |
Constructor Summary | |
| |
|
Method Summary | |
void |
|
void |
|
Methods inherited from class org.pdfbox.pdmodel.encryption.SecurityHandler | |
decryptDocument , decryptStream , decryptString , encryptData , getCurrentAccessPermission , getKeyLength , prepareDocumentForEncryption , proceedDecryption , setKeyLength |
public PublicKeySecurityHandler()
Constructor.
public PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
Constructor used for encryption.
- Parameters:
p
- The protection policy.
public void decryptDocument(PDDocument doc, DecryptionMaterial decryptionMaterial) throws CryptographyException, IOException
Decrypt the document.
- Overrides:
- decryptDocument in interface SecurityHandler
- Parameters:
doc
- The document to decrypt.decryptionMaterial
- The data used to decrypt the document.
- Throws:
CryptographyException
- If there is an error during decryption.
public void prepareDocumentForEncryption(PDDocument doc) throws CryptographyException
Prepare the document for encryption.
- Overrides:
- prepareDocumentForEncryption in interface SecurityHandler
- Parameters:
doc
- The document that will be encrypted.
- Throws:
CryptographyException
- If there is an error while encrypting.