aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/Pl_AES_PDF.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-11-04 20:41:10 +0100
committerJay Berkenbilt <ejb@ql.org>2019-11-09 14:18:02 +0100
commitd1ffe46c04e87a297fed50ba0ff79213cdee7a5e (patch)
treef17faec6741f1ff02ebc5b59fc6071550ca2c099 /libqpdf/qpdf/Pl_AES_PDF.hh
parentc8cda4f965064a9c4621d8d9f889eb7037fe72bb (diff)
downloadqpdf-d1ffe46c04e87a297fed50ba0ff79213cdee7a5e.tar.zst
AES_PDF: move CBC logic from pipeline to AES_PDF implementation
Diffstat (limited to 'libqpdf/qpdf/Pl_AES_PDF.hh')
-rw-r--r--libqpdf/qpdf/Pl_AES_PDF.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/qpdf/Pl_AES_PDF.hh b/libqpdf/qpdf/Pl_AES_PDF.hh
index f8f44c70..4d0d5fb3 100644
--- a/libqpdf/qpdf/Pl_AES_PDF.hh
+++ b/libqpdf/qpdf/Pl_AES_PDF.hh
@@ -2,7 +2,6 @@
#define PL_AES_PDF_HH
#include <qpdf/Pipeline.hh>
-#include <qpdf/qpdf-config.h>
#include <qpdf/QPDFCryptoImpl.hh>
#include <memory>
@@ -47,7 +46,7 @@ class Pl_AES_PDF: public Pipeline
void flush(bool discard_padding);
void initializeVector();
- static unsigned int const buf_size = 16;
+ static unsigned int const buf_size = QPDFCryptoImpl::rijndael_buf_size;
static bool use_static_iv;
std::shared_ptr<QPDFCryptoImpl> crypto;
@@ -56,6 +55,7 @@ class Pl_AES_PDF: public Pipeline
bool first;
size_t offset; // offset into memory buffer
std::unique_ptr<unsigned char[]> key;
+ size_t key_bytes;
unsigned char inbuf[buf_size];
unsigned char outbuf[buf_size];
unsigned char cbc_block[buf_size];