Skip to main content

Module zipcrypto

Module zipcrypto 

Source
Expand description

Traditional PKWARE (“ZipCrypto”) encryption and decryption.

This is the legacy stream cipher from the PKWARE APPNOTE (§6), kept for interoperating with older archives. It is cryptographically weak and should not be relied on for confidentiality; prefer WinZip AES for new data.

Decryptor wraps an entry’s encrypted reader and yields the decrypted (still compressed) body, so layer a decompressor and a CRC check on top. Encryptor is the write-side counterpart: it emits the encryption header and encrypts the (already compressed) body on its way to the archive.

Structs§

Decryptor
A Read adapter that decrypts a ZipCrypto entry on the fly.
Encryptor
A Write adapter that encrypts a ZipCrypto entry on the fly.