Package org.openpdf.renderer.decrypt
Class PDFDecrypterFactory
java.lang.Object
org.openpdf.renderer.decrypt.PDFDecrypterFactory
Deprecated.
Produces a
PDFDecrypter for documents given a (possibly non-existent)
Encrypt dictionary. Supports decryption of versions 1, 2 and 4 of the
password-based encryption mechanisms as described in PDF Reference version
1.7. This means that it supports RC4 and AES encryption with keys of
40-128 bits; esentially, password-protected documents with compatibility
up to Acrobat 8.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.The name of the standard Identity CryptFilterprivate static final intDeprecated.Default key length for versions where key length is optional -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PDFDecryptercreateDecryptor(PDFObject encryptDict, PDFObject documentId, PDFPassword password) Deprecated.Create a decryptor for a given encryption dictionary.static booleanisFilterExist(PDFObject encryptDict) Deprecated.
-
Field Details
-
CF_IDENTITY
Deprecated.The name of the standard Identity CryptFilter- See Also:
-
DEFAULT_KEY_LENGTH
private static final int DEFAULT_KEY_LENGTHDeprecated.Default key length for versions where key length is optional- See Also:
-
-
Constructor Details
-
PDFDecrypterFactory
public PDFDecrypterFactory()Deprecated.
-
-
Method Details
-
createDecryptor
public static PDFDecrypter createDecryptor(PDFObject encryptDict, PDFObject documentId, PDFPassword password) throws IOException, EncryptionUnsupportedByPlatformException, EncryptionUnsupportedByProductException, PDFAuthenticationFailureException Deprecated.Create a decryptor for a given encryption dictionary. A check is immediately performed that the supplied password decrypts content described by the encryption specification.- Parameters:
encryptDict- the Encrypt dict as found in the document's trailer. May be null, in which case theIdentityDecrypterwill be returned.documentId- the object with key "ID" in the trailer's dictionary. Should always be present if Encrypt is.password- the password to use; may benull- Returns:
- The decryptor that should be used for all encrypted data in the PDF
- Throws:
IOException- will typically be aPDFParseException, indicating an IO problem, an error in the structure of the document, or a failure to obtain various ciphers from the installed JCE providersEncryptionUnsupportedByPlatformException- if the encryption is not supported by the environment in which the code is executingEncryptionUnsupportedByProductException- if PDFRenderer does not currently support the specified encryptionPDFAuthenticationFailureException- if the supplied password was not able to
-
isFilterExist
Deprecated.- Parameters:
encryptDict- the Encrypt dict as found in the document's trailer.- Returns:
- true if the Filter exist in the current dictionary
-