A module for file encryption and decryption
Project description
PyFileCrypto
Overview
The PyFileCrypto Module is a Python library for encrypting and decrypting files, compressing and extracting zip files with password protection. It utilizes cryptography.fernet for encryption and pyzipper for handling zip files with AES encryption.
Features
- File Encryption and Decryption: Encrypt and decrypt files with strong AES encryption.
- Key Management: Generate and securely store keys for encryption and decryption.
- Zip Compression: Compress files into zip archives.
- Password-Protected Zip Files: Create and extract zip files with password protection.
Installation
To install the Crypto Module, use the following command:
pip install pyfilecrypto
Usage
Method: 1
Generate Encryption Key and Encrypt File
from pyfilecrypto.crypto import ACrypto
ACrypto.encryptFile("test.txt", "test.enc", "my_secret.key")
Use key and Decrypt File
from pyfilecrypto.crypto import ACrypto
ACrypto.decryptFile("test.enc", "test.txt", "my_secret.key")
Method: 2
Generate Encryption Key and Encrypt File
from pyfilecrypto.crypto import BCrypto
BCrypto.Encrypt(filename = "test.txt")
Use keys and Decrypt file
from pyfilecrypto.crypto import BCrypto
BCrypto.Decrypt(filename = "test.txt")
Method: 3
Generate Encryption key and Encrypt File
from pyfilecrypto.crypto import BCrypto
BCrypto.crypt(filename = "test.txt", method = "encrypt")
Decrypt file using keys
from pyfilecrypto.crypto import BCrypto
BCrypto.crypt(filename = "test.txt", method = "decrypt")
Method: 4
Encrypt and Decrypt file with keys
from pyfilecrypto.crypto import Crypto
Crypto.crypt(filename = "test.txt", method = "encrypt", password = "password")
Crypto.crypt(filename = "test.txt", method = "decrypt", password = "password")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfilecrypto-1.0.2.tar.gz.
File metadata
- Download URL: pyfilecrypto-1.0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab1e402e75ca092bd8767dd42eba45858816c5f3c8bd3ce8a7187a293a4d9334
|
|
| MD5 |
347ae337150c9c7572e2fed6dc7afd46
|
|
| BLAKE2b-256 |
aae5069de1d7cbf7c9eaeb426c9819154b02ceb91818be2cef80c8d4ed5785e4
|
File details
Details for the file pyfilecrypto-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pyfilecrypto-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3d21b482f617d8a831b3bc8865ca272724788ebeca1a815195c62e777ebb171
|
|
| MD5 |
dbfd2594a6f2506770106bd31126b941
|
|
| BLAKE2b-256 |
3d8d1a5dabe8b974273fdabd72f08610c183b65b34638e42a2b5ca5039025c29
|