From 3680922ae5efbf544afcfa3dd72e2f1db336c45f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 29 Dec 2012 10:43:46 -0500 Subject: Allow specification of AES initialization vector --- libqpdf/qpdf/Pl_AES_PDF.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libqpdf/qpdf') diff --git a/libqpdf/qpdf/Pl_AES_PDF.hh b/libqpdf/qpdf/Pl_AES_PDF.hh index 72f82229..9aa73ad6 100644 --- a/libqpdf/qpdf/Pl_AES_PDF.hh +++ b/libqpdf/qpdf/Pl_AES_PDF.hh @@ -31,6 +31,10 @@ class Pl_AES_PDF: public Pipeline // Disable padding; needed for AESV3 QPDF_DLL void disablePadding(); + // Specify an initialization vector, which will not be included in + // the output. + QPDF_DLL + void setIV(unsigned char const* iv, size_t bytes); // For testing only; PDF always uses CBC QPDF_DLL @@ -55,8 +59,10 @@ class Pl_AES_PDF: public Pipeline unsigned char inbuf[buf_size]; unsigned char outbuf[buf_size]; unsigned char cbc_block[buf_size]; + unsigned char specified_iv[buf_size]; unsigned int nrounds; bool use_zero_iv; + bool use_specified_iv; bool disable_padding; }; -- cgit v1.2.3-70-g09d2