diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-10-17 05:14:47 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-10-17 05:14:47 +0200 |
commit | 846c9f6bcc9aa86067850088808ff8d724a0d18f (patch) | |
tree | 587f6ff5589ebaefad50ca9f1b1b7fa81736a119 /libqpdf/qpdf | |
parent | ad19b03fd346e6779a029c43b6228e377919852f (diff) | |
download | qpdf-846c9f6bcc9aa86067850088808ff8d724a0d18f.tar.zst |
checkpoint -- started doing some R4 encryption support
git-svn-id: svn+q:///qpdf/trunk@807 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r-- | libqpdf/qpdf/Pl_AES_PDF.hh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libqpdf/qpdf/Pl_AES_PDF.hh b/libqpdf/qpdf/Pl_AES_PDF.hh new file mode 100644 index 00000000..6939abb8 --- /dev/null +++ b/libqpdf/qpdf/Pl_AES_PDF.hh @@ -0,0 +1,27 @@ +#ifndef __PL_AES_PDF_HH__ +#define __PL_AES_PDF_HH__ + +#include <qpdf/Pipeline.hh> + +class DLL_EXPORT Pl_AES_PDF: public Pipeline +{ + public: + // key_data should be a pointer to key_size bytes of data + static unsigned int const key_size = 16; + Pl_AES_PDF(char const* identifier, Pipeline* next, + bool encrypt, unsigned char* key_data); + virtual ~Pl_AES_PDF(); + + virtual void write(unsigned char* data, int len); + virtual void finish(); + + private: + void flush(bool discard_padding); + + bool encrypt; + unsigned int offset; + static unsigned int const buf_size = 16; + unsigned char buf[buf_size]; +}; + +#endif // __PL_AES_PDF_HH__ |