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