org.pdfbox.encryption
Class DocumentEncryption
java.lang.Object
org.pdfbox.encryption.DocumentEncryption
public class DocumentEncryption
extends java.lang.Object
This class will deal with encrypting/decrypting a document.
void | decrypt(Object obj, long objNum, long genNum) - This will dispatch to the correct method.
|
void | decryptDocument(String password) - This will decrypt the document.
|
void | initForEncryption() - This will encrypt the given document, given the owner password and user password.
|
DocumentEncryption
public DocumentEncryption(COSDocument doc)
Constructor.
doc
- The document to decrypt.
DocumentEncryption
public DocumentEncryption(PDDocument doc)
Constructor.
doc
- The document to decrypt.
decrypt
public void decrypt(Object obj,
long objNum,
long genNum)
throws CryptographyException,
IOException
This will dispatch to the correct method.
obj
- The object to decrypt.objNum
- The object number.genNum
- The object generation Number.
initForEncryption
public void initForEncryption()
throws CryptographyException,
IOException
This will encrypt the given document, given the owner password and user password.
The encryption method used is the standard filter.