Package org.verapdf.tools
Class EncryptionToolsRevision5_6
- java.lang.Object
-
- org.verapdf.tools.EncryptionToolsRevision5_6
-
public class EncryptionToolsRevision5_6 extends Object
- Author:
- Sergey Shemyakov
-
-
Constructor Summary
Constructors Constructor Description EncryptionToolsRevision5_6()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidenableAES256()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.
-
-
-
Method Detail
-
getFileEncryptionKey
public static byte[] getFileEncryptionKey(byte[] password, byte[] o, byte[] u, byte[] oe, byte[] ue, long revision) throws GeneralSecurityExceptionImplementation 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
public static void enableAES256() throws GeneralSecurityException- Throws:
GeneralSecurityException
-
-