public class DocumentEncryption extends Object
StandardSecurityHandler| Constructor and Description | 
|---|
| DocumentEncryption(COSDocument doc)Deprecated.  Constructor. | 
| DocumentEncryption(PDDocument doc)Deprecated.  Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
public DocumentEncryption(PDDocument doc)
doc - The document to decrypt.public DocumentEncryption(COSDocument doc)
doc - The document to decrypt.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.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.