org.pdfbox.pdmodel.encryption
Class ProtectionPolicy
java.lang.Object
org.pdfbox.pdmodel.encryption.ProtectionPolicy
public abstract class ProtectionPolicy
extends java.lang.Object
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.
- Benoit Guillon (benoit.guillon@snv.jussieu.fr)
int | getEncryptionKeyLength() - Get the length of the secrete key that will be used to encrypt
document data.
|
void | setEncryptionKeyLength(int l) - set the length in (bits) of the secret key that will be
used to encrypt document data.
|
getEncryptionKeyLength
public int getEncryptionKeyLength()
Get the length of the secrete key that will be used to encrypt
document data.
- The length (in bits) of the encryption key.
setEncryptionKeyLength
public void setEncryptionKeyLength(int 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.
l
- the length in bits (must be 40 or 128)