org.apache.pdfbox.pdmodel.encryption
abstract public class: ProtectionPolicy [javadoc |
source]
java.lang.Object
org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy
Direct Known Subclasses:
PublicKeyProtectionPolicy, StandardProtectionPolicy
This class represents the protection policy to apply to a document.
Objects implementing this abstract class can be passed to the protect method of PDDocument
to protect a document.
Also see:
- org.apache.pdfbox.pdmodel.PDDocument#protect(ProtectionPolicy)
- author:
Benoit
- Guillon (benoit.guillon@snv.jussieu.fr)
- version:
$
- Revision: 1.3 $
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy Detail: |
public int getEncryptionKeyLength() {
return encryptionKeyLength;
}
Get the length of the secrete key that will be used to encrypt
document data. |
public void setEncryptionKeyLength(int l) {
if(l!=40 && l!=128)
{
throw new RuntimeException("Invalid key length '" + l + "' value must be 40 or 128!");
}
encryptionKeyLength = l;
}
set the length in (bits) of the secret key that will be
used to encrypt document data.
The default value is 40 bits, which provides a low security level
but is compatible with old versions of Acrobat Reader. |