org.pdfbox.pdmodel.encryption
Class StandardDecryptionMaterial

java.lang.Object
  extended byorg.pdfbox.pdmodel.encryption.DecryptionMaterial
      extended byorg.pdfbox.pdmodel.encryption.StandardDecryptionMaterial

public class StandardDecryptionMaterial
extends DecryptionMaterial

Represents the necessary information to decrypt a document protected by the standard security handler (password protection). This is only composed of a password. The following example shows how to decrypt a document protected with the standard security handler:

  PDDocument doc = PDDocument.load(in);
  StandardDecryptionMaterial dm = new StandardDecryptionMaterial("password");
  doc.openProtection(dm);
  

Version:
$Revision: 1.2 $
Author:
Benoit Guillon (benoit.guillon@snv.jussieu.fr)

Constructor Summary
StandardDecryptionMaterial(String pwd)
          Create a new standard decryption material with the given password.
 
Method Summary
 String getPassword()
          Returns the password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardDecryptionMaterial

public StandardDecryptionMaterial(String pwd)
Create a new standard decryption material with the given password.

Parameters:
pwd - The password.
Method Detail

getPassword

public String getPassword()
Returns the password.

Returns:
The password used to decrypt the document.