[poppler] [PATCHES] Support to save encrypted files with PDFDoc::saveAs

Fabio D'Urso fabiodurso at hotmail.it
Tue Aug 28 15:08:34 PDT 2012


I've updated three patches:
 - Tidied up BaseCryptStream::getChar() implementation
   I had moved the code that moved the buffer position forward in the base
   class. However, it's better to keep it duplicated in EncryptStream and
   DecryptStream (it's only simple incremement), as this keeps code simpler.
   This change affects 0001 and 0002.

 - Fill CBC initialization vector (IV) in EncryptStream ctor, not when
   reset() is called. Otherwise, the IV is reinitialized with different
   values, resulting in the same stream having different contents each time.
   This change affects 0002 and 0005.

I'm attaching the updated pathes.

Fabio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactoring-of-Decrypt.cc-.h-in-preparation-for-encr.patch
Type: text/x-patch
Size: 13798 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120829/4f0bd985/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-encryption-support-in-Decrypt.cc-.h.patch
Type: text/x-patch
Size: 9818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120829/4f0bd985/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Initialize-AES-encryption-with-random-CBC-IV-data.patch
Type: text/x-patch
Size: 1045 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120829/4f0bd985/attachment-0002.bin>


More information about the poppler mailing list