|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.pdmodel.encryption.SecurityHandler
org.pdfbox.pdmodel.encryption.PublicKeySecurityHandler
This class implements the public key security handler described in the PDF specification.
Spec 1.6 p104
,
to see how to protect document with this security handler.
Field Summary | |
static String |
FILTER
The filter name. |
Fields inherited from class org.pdfbox.pdmodel.encryption.SecurityHandler |
currentAccessPermission, document, encryptionKey, keyLength, rc4, version |
Constructor Summary | |
PublicKeySecurityHandler()
Constructor. |
|
PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
Constructor used for encryption. |
Method Summary | |
void |
decryptDocument(PDDocument doc,
DecryptionMaterial decryptionMaterial)
Decrypt the document. |
void |
prepareDocumentForEncryption(PDDocument doc)
Prepare the document for encryption. |
Methods inherited from class org.pdfbox.pdmodel.encryption.SecurityHandler |
decryptStream, decryptString, encryptData, getCurrentAccessPermission, getKeyLength, proceedDecryption, setKeyLength |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String FILTER
Constructor Detail |
public PublicKeySecurityHandler()
public PublicKeySecurityHandler(PublicKeyProtectionPolicy p)
p
- The protection policy.Method Detail |
public void decryptDocument(PDDocument doc, DecryptionMaterial decryptionMaterial) throws CryptographyException, 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.
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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |