[Python-ideas] hook zipfile.ZipExtFile to check secure hash sums

Serhiy Storchaka storchaka at gmail.com
Thu Aug 30 19:05:50 CEST 2012

On 29.08.12 19:08, Daniel Holth wrote:
> I am checking the sha256 sums of all the files in a zip archive as it
> is being extracted by overriding ZipExtFile._update_crc, but it is
> inconvenient.
> It would be nice to have a hook, for example the ZipExtFile
> constructor could be a property of ZipFile and conveniently replaced
> with a ZipExtFile subclass.

Where do you get the checksums for control? ZIP file format specifies 
the checksum algorithm, file with another saved checksums is not ZIP 
file (or is invalid ZIP file).

More information about the Python-ideas mailing list