Encryption for zipfile
Project description
zipencrypt is a Python module to provide weak password-based encryption for zipfiles. It is meant as a drop-in replacement for zipfile from the standard lib and provides the counterpart to the decryption implemented there.
It is implemented in pure python and does not rely on any 3rd party libraries.
Compatible to python 2.7 and 3.4+
Installation
pip install zipencrypt
The code
from zipencrypt import ZipFile
with ZipFile("file.zip", mode="w") as f:
f.writestr("file1.txt", "plaintext", pwd=b"password")
Do not use this!
The standard encryption of ZIP is known to be seriously flawed (see here). That is probably the reason why it is not implemented in zipfile in the standard lib. There are however legitimate use cases.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zipencrypt-0.3.1.tar.gz
(21.8 kB
view details)
File details
Details for the file zipencrypt-0.3.1.tar.gz
.
File metadata
- Download URL: zipencrypt-0.3.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42480fb2e3ec54945fbba971a0b507bf7c528344a744cf9a73a83eb84825a34a |
|
MD5 | 522834b34c0f8d553c9cd2bf1322e025 |
|
BLAKE2b-256 | 5479e098d3337d099abe6b2a2ae064ab2a9f1d7b4c3ad19fc649fe0e5e3efa4d |