Package org.verapdf.tools
Class EncryptionToolsRevision5_6
java.lang.Object
org.verapdf.tools.EncryptionToolsRevision5_6
- Author:
- Sergey Shemyakov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static byte[]
getFileEncryptionKey
(byte[] password, byte[] o, byte[] u, byte[] oe, byte[] ue, long revision) Implementation of algorithm 2.A: Retrieving the file encryption key from an encrypted document in order to decrypt it (revision 6 and later) as described in PDF-2.0 specification.
-
Constructor Details
-
EncryptionToolsRevision5_6
public EncryptionToolsRevision5_6()
-
-
Method Details
-
getFileEncryptionKey
public static byte[] getFileEncryptionKey(byte[] password, byte[] o, byte[] u, byte[] oe, byte[] ue, long revision) throws GeneralSecurityException Implementation of algorithm 2.A: Retrieving the file encryption key from an encrypted document in order to decrypt it (revision 6 and later) as described in PDF-2.0 specification.- Parameters:
password
- is UTF-8 representation of password.o
- is value of O key.u
- is value of U key.oe
- is value of OE key. At least one of oe, ue should not be null.ue
- is value of UE key. At least one of oe, ue should not be null.- Returns:
- calculated file encryption key.
- Throws:
GeneralSecurityException
- if password is not valid or error with AES-256 happens.
-
enableAES256
- Throws:
GeneralSecurityException
-