blob: 0b932038f261391593be2dd7cd3d3795f2199685 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef AES_PDF_NATIVE_HH
#define AES_PDF_NATIVE_HH
#include <cstdint>
#include <cstring>
#include <memory>
class AES_PDF_native
{
public:
// key should be a pointer to key_bytes bytes of data
AES_PDF_native(
bool encrypt,
unsigned char const* key,
size_t key_bytes,
bool cbc_mode,
unsigned char* cbc_block);
~AES_PDF_native() = default;
void update(unsigned char* in_data, unsigned char* out_data);
private:
bool encrypt;
bool cbc_mode;
unsigned char* cbc_block;
std::unique_ptr<unsigned char[]> key;
std::unique_ptr<uint32_t[]> rk;
unsigned int nrounds;
};
#endif // AES_PDF_NATIVE_HH
|