https://github.com/zshn1248/pyfilecrypto
PyFileCrypto is a Python module for easy encryption and decryption of files using the cryptography library. It provides a simple interface to generate encryption keys, encrypt files, and decrypt files securely.
https://github.com/zshn1248/pyfilecrypto
data decryption encryption file security-tools
Last synced: 3 months ago
JSON representation
PyFileCrypto is a Python module for easy encryption and decryption of files using the cryptography library. It provides a simple interface to generate encryption keys, encrypt files, and decrypt files securely.
- Host: GitHub
- URL: https://github.com/zshn1248/pyfilecrypto
- Owner: zshn1248
- License: other
- Created: 2024-06-27T12:07:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-07T13:29:25.000Z (12 months ago)
- Last Synced: 2025-12-15T17:17:45.960Z (6 months ago)
- Topics: data, decryption, encryption, file, security-tools
- Language: Python
- Homepage: https://github.com/zshn1248/pyfilecrypto
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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:
```sh
pip install pyfilecrypto
```
## Usage
### Method: 1
#### Generate Encryption Key and Encrypt File
``` python
from pyfilecrypto.crypto import ACrypto
ACrypto.encryptFile("test.txt", "test.enc", "my_secret.key")
```
#### Use key and Decrypt File
``` python
from pyfilecrypto.crypto import ACrypto
ACrypto.decryptFile("test.enc", "test.txt", "my_secret.key")
```
### Method: 2
#### Generate Encryption Key and Encrypt File
``` python
from pyfilecrypto.crypto import BCrypto
BCrypto.Encrypt(filename = "test.txt")
```
#### Use keys and Decrypt file
``` python
from pyfilecrypto.crypto import BCrypto
BCrypto.Decrypt(filename = "test.txt")
```
### Method: 3
#### Generate Encryption key and Encrypt File
``` python
from pyfilecrypto.crypto import BCrypto
BCrypto.crypt(filename = "test.txt", method = "encrypt")
```
#### Decrypt file using keys
``` python
from pyfilecrypto.crypto import BCrypto
BCrypto.crypt(filename = "test.txt", method = "decrypt")
```
### Method: 4
#### Encrypt and Decrypt file with keys
``` python
from pyfilecrypto.crypto import Crypto
Crypto.crypt(filename = "test.txt", method = "encrypt", password = "password")
Crypto.crypt(filename = "test.txt", method = "decrypt", password = "password")
```
## Documentation
For detailed documentation, please refer to the [DOCUMENTATION.md](https://github.com/zshn1248/pyfilecrypto/blob/main/DOCUMENTATION.md) file.
## License
Please refer to LICENSE [here](https://github.com/zshn1248/pyfilecrypto/blob/main/LICENSE.md)