Hello, Here is a proposition for a patch that brings EASV3 (256-bits, supported in PDF 1.7 Extension Level 3) encryption support in Podofo. EASV3 is based on SHA instead of MD5 (used by every other algorithm) so it has lots of specificities. I had to refactor the PdfEncrypt* classes a bit.
I also included some minor fixes on other things related to encryption,
especially AESV2.
On my machine (OSX, llvm/gcc 4.2), the whole thing compiles in Xcode and Unix
Makefiles mode as well and every encryption-related test passes.
One is broken, but i don't think it was working before :
<FailedTest id="66">
<Name>FontTest::testFonts</Name>
<FailureType>Error</FailureType>
<Message>uncaught exception of type PoDoFo::PdfError
- ePdfError_UnsupportedFontFormat
</Message>
</FailedTest>.
podofoencrypt works for every supported algorithm.
TODO:
- the permission codes are encoded differently for each version of the
encryption algorithms. Podofo uses the RC4V1 way of coding them for everybody,
which doesn't work.
- decrypt AES streams
- ...
Any feedback would be appreciated (especially is i did something wrong) :)
Regards,
--
Palmer Zent
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
Podofo_AES-256.patch.gz
Description: Binary data
------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
