public class EncryptionToolsRevision5_6 extends Object
Constructor and Description |
---|
EncryptionToolsRevision5_6() |
Modifier and Type | Method and Description |
---|---|
static void |
enableAES256() |
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.
|
public static byte[] getFileEncryptionKey(byte[] password, byte[] o, byte[] u, byte[] oe, byte[] ue, long revision) throws GeneralSecurityException
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.GeneralSecurityException
- if password is not valid or error with
AES-256 happens.public static void enableAES256() throws GeneralSecurityException
GeneralSecurityException
Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.