summaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-17 20:54:51 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-17 20:54:51 +0200
commitc13bc66de8d6ef553c4ed05247774476a859a5f3 (patch)
treede0daed86869f322c921f281fa7c6a5337738a81 /libqpdf/qpdf
parent27e8d4bbfffef1072043ef21725ab85eabaee63b (diff)
downloadqpdf-c13bc66de8d6ef553c4ed05247774476a859a5f3.tar.zst
checkpoint -- partially implemented /V=4 encryption
git-svn-id: svn+q:///qpdf/trunk@811 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r--libqpdf/qpdf/Pl_AES_PDF.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/libqpdf/qpdf/Pl_AES_PDF.hh b/libqpdf/qpdf/Pl_AES_PDF.hh
index 442c9bf3..adacc6e5 100644
--- a/libqpdf/qpdf/Pl_AES_PDF.hh
+++ b/libqpdf/qpdf/Pl_AES_PDF.hh
@@ -18,17 +18,24 @@ class DLL_EXPORT Pl_AES_PDF: public Pipeline
virtual void write(unsigned char* data, int len);
virtual void finish();
+ // For testing only; PDF always uses CBC
+ void disableCBC();
+
private:
void flush(bool discard_padding);
+ void initializeVector();
static unsigned int const buf_size = 16;
bool encrypt;
+ bool cbc_mode;
+ bool first;
unsigned int offset;
unsigned char key[key_size];
uint32_t rk[key_size + 28];
unsigned char inbuf[buf_size];
unsigned char outbuf[buf_size];
+ unsigned char cbc_block[buf_size];
unsigned int nrounds;
};