public class DocumentEncryption
extends java.lang.Object
StandardSecurityHandler| Constructor and Description |
|---|
DocumentEncryption(COSDocument doc)
Deprecated.
Constructor.
|
DocumentEncryption(PDDocument doc)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrypt(java.lang.Object obj,
long objNum,
long genNum)
Deprecated.
This will dispatch to the correct method.
|
void |
decryptDocument(java.lang.String password)
Deprecated.
This will decrypt the document.
|
void |
initForEncryption()
Deprecated.
This will encrypt the given document, given the owner password and user password.
|
public DocumentEncryption(PDDocument doc)
doc - The document to decrypt.public DocumentEncryption(COSDocument doc)
doc - The document to decrypt.public void initForEncryption()
throws CryptographyException,
java.io.IOException
CryptographyException - If an error occurs during encryption.java.io.IOException - If there is an error accessing the data.public void decryptDocument(java.lang.String password)
throws CryptographyException,
java.io.IOException,
InvalidPasswordException
password - The password for the document.CryptographyException - If there is an error decrypting the document.java.io.IOException - If there is an error getting the stream data.InvalidPasswordException - If the password is not a user or owner password.public void decrypt(java.lang.Object obj,
long objNum,
long genNum)
throws CryptographyException,
java.io.IOException
obj - The object to decrypt.objNum - The object number.genNum - The object generation Number.CryptographyException - If there is an error decrypting the stream.java.io.IOException - If there is an error getting the stream data.