A security-based application designed to protect sensitive files by converting their contents into an unreadable format using encryption. The encrypted data can only be restored using the correct decryption process.
This project demonstrates concepts such as data security, cryptography basics, algorithm design, and file handling.
- File Reading: Load and read contents from supported file types (.txt, .csv, .log, .json, .xml, .md)
- File Encryption: Convert readable plaintext to unreadable ciphertext using Caesar cipher or key-based encryption
- File Decryption: Restore encrypted data back to its original readable format
- Save Output: Export processed results to new files
file-encryption-decryption/
├── README.md
├── main.py
├── input/
│ └── sample.txt
├── output/
│ ├── encrypted.txt
│ └── decrypted.txt
├── src/
│ ├── __init__.py
│ ├── file_reader.py
│ ├── encryptor.py
│ ├── decryptor.py
│ └── utils.py
└── tests/
├── __init__.py
└── test_encryption.py
- Ensure you have Python 3.6+ installed
- Clone or download this repository
- Navigate to the project directory
cd file-encryption-decryptionRun the main program:
python main.py- Encrypt a file: Select a file and encrypt its contents
- Decrypt a file: Select an encrypted file and decrypt it
- Run demo: See a demonstration of encryption/decryption
- Exit: Quit the application
- Caesar Cipher: Uses a shift value to encrypt/decrypt (default shift: 3)
- Key-based Encryption: Uses a custom key for Vigenère-like cipher
Original Text: Hello World
Shift: 3
Encrypted: Khoor Zruog
Original Text: Hello World
Key: secret
Encrypted: ZiInc Pgvnu
Run the test suite:
cd tests
python test_encryption.pyOr using unittest:
python -m unittest tests.test_encryptionResponsible for reading file content with support for multiple file types.
Handles encryption logic using Caesar cipher algorithm with optional key-based encryption.
Handles decryption logic with support for brute-force decryption.
Contains helper functions for file operations, validation, and user interface.
By completing this project, you will learn:
- File input/output operations
- Basic cryptography concepts
- Encryption and decryption algorithms
- Modular programming design
- Secure data handling techniques
- AES encryption algorithm
- Password-based encryption
- Graphical user interface (GUI)
- Support for multiple file formats
- Cloud-based encrypted storage system