org.pdfbox.pdmodel.encryption
Class PDEncryptionManager
java.lang.Object
org.pdfbox.pdmodel.encryption.PDEncryptionManager
public class PDEncryptionManager
extends java.lang.Object
This class will handle loading of the different security handlers.
See PDF Reference 1.4 section "3.5 Encryption"
getEncryptionDictionary
public static PDEncryptionDictionary getEncryptionDictionary(COSDictionary dictionary)
throws IOException
This will get the correct security handler for the encryption dictionary.
dictionary
- The encryption dictionary.
- An implementation of PDEncryptionDictionary(PDStandardEncryption for most cases).
registerSecurityHandler
public static void registerSecurityHandler(String filterName,
Class handlerClass)
This will allow the user to register new security handlers when unencrypting a
document.
filterName
- As described in the encryption dictionary.handlerClass
- A subclass of PDEncryptionDictionary that has a constructor that takes
a COSDictionary.