|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.encryption.DocumentEncryption
public class DocumentEncryption
This class will deal with encrypting/decrypting a document.
StandardSecurityHandler
Constructor Summary | |
---|---|
DocumentEncryption(COSDocument doc)
Deprecated. Constructor. |
|
DocumentEncryption(PDDocument doc)
Deprecated. Constructor. |
Method Summary | |
---|---|
void |
decrypt(Object obj,
long objNum,
long genNum)
Deprecated. This will dispatch to the correct method. |
void |
decryptDocument(String password)
Deprecated. This will decrypt the document. |
void |
initForEncryption()
Deprecated. This will encrypt the given document, given the owner password and user password. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentEncryption(PDDocument doc)
doc
- The document to decrypt.public DocumentEncryption(COSDocument doc)
doc
- The document to decrypt.Method Detail |
---|
public void initForEncryption() throws CryptographyException, IOException
CryptographyException
- If an error occurs during encryption.
IOException
- If there is an error accessing the data.public void decryptDocument(String password) throws CryptographyException, IOException, InvalidPasswordException
password
- The password for the document.
CryptographyException
- If there is an error decrypting the document.
IOException
- If there is an error getting the stream data.
InvalidPasswordException
- If the password is not a user or owner password.public void decrypt(Object obj, long objNum, long genNum) throws CryptographyException, IOException
obj
- The object to decrypt.objNum
- The object number.genNum
- The object generation Number.
CryptographyException
- If there is an error decrypting the stream.
IOException
- If there is an error getting the stream data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |