A modular C++17 File Encryption/Decryption Utility that recursively processes files within a directory. Designed to gain understanding in modern C++ programming, object-oriented design, task management and file handling.
- Encrypts and decrypts files recursively inside a directory
- Supports directory traversal using filesystem
- Environment variable based secret key
- Modular project architecture
- Queue-based task management
- Built using modern C++17
- Makefile-based build system
- Error handling for invalid directories and inaccessible files
FileEncryptor/
│
├── src/
│ ├── encryptor/
│ ├── fileHandling/
│ ├── processManagement/
│ ├── readEnv/
│ └── main.cpp
│
├── test/
│ └── sample files
│
├── .env.example
├── Makefile
└── README.md
- C++17
- STL
- filesystem
- Smart Pointers
- File Streams
- GNU Make
Clone the repository:
git clone https://github.com/Vaibhavkshyp/file-encryptor-cpp.git
cd file-encryptor-cppBuild:
makeRun:
make runClean build files:
make cleanCreate a .env file in the project root.
Example:
SECRET_KEY=5The secret key is loaded during runtime and used for encryption and decryption.
- User provides a directory.
- User selects Encrypt or Decrypt.
- The application recursively scans the directory.
- Each file is added to a processing queue.
- The encryption engine reads the secret key from the environment.
- Every file is processed individually.
This project helped me gain practical experience with:
- Modern C++17
- File handling
- Object-Oriented Programming
- Smart pointers
- Makefiles
- Exception handling
- Project organization
- Recursive directory traversal
This project is intended for educational and portfolio purposes.