https://github.com/sv592/secure_file_manager
A lightweight C++ application for secure file encryption, decryption, hashing, and digital signature management.
https://github.com/sv592/secure_file_manager
cmake cpp cryptography
Last synced: 14 days ago
JSON representation
A lightweight C++ application for secure file encryption, decryption, hashing, and digital signature management.
- Host: GitHub
- URL: https://github.com/sv592/secure_file_manager
- Owner: SV592
- Created: 2025-01-08T01:28:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-12T18:10:31.000Z (12 months ago)
- Last Synced: 2025-07-12T20:28:18.807Z (12 months ago)
- Topics: cmake, cpp, cryptography
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Secure File Manager
A cryptographic file operations tool with a CLI and an Electron desktop GUI.



## Features
- **Encrypt** — AES-256-CBC file encryption with random IV and key
- **Decrypt** — AES-256-CBC file decryption using stored key/IV
- **Hash** — SHA-256 file hashing
- **Sign** — RSA digital signature creation
- **Verify** — RSA signature verification
## Screenshots
The Electron GUI uses a cyberpunk-themed dark interface with neon accent colors, CRT scanline effects, and native file browse dialogs.
## Prerequisites
- **Visual Studio 2022** (MSVC C++17 compiler)
- **CMake 3.10+**
- **OpenSSL 3.x** — installed at `C:\Program Files\OpenSSL-Win64`
- **Node.js 18+** — for the Electron GUI
- **Windows 10 SDK**
## Building the CLI
Open a **Developer Command Prompt for VS 2022** and run:
```bash
cmake -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="C:\Program Files\OpenSSL-Win64"
cmake --build build --target secure_file_manager
```
Or with the Visual Studio generator:
```bash
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --target secure_file_manager
```
## CLI Usage
```bash
secure_file_manager encrypt
secure_file_manager decrypt
secure_file_manager hash
secure_file_manager sign
secure_file_manager verify
```
- Encryption generates `key_iv.bin` in the working directory (required for decryption)
- Signing requires `private.pem` in the working directory
- Verification requires `public.pem` in the working directory
## Electron GUI
The desktop GUI wraps the CLI with a cyberpunk-themed interface built on Electron.
### Setup
```bash
cd gui
npm install
```
### Launch
```bash
unset ELECTRON_RUN_AS_NODE
npm start
```
> **Note:** VS Code's integrated terminal sets `ELECTRON_RUN_AS_NODE=1` which prevents Electron from launching as a desktop app. Run `unset ELECTRON_RUN_AS_NODE` first, or use a standalone terminal.
The GUI spawns the compiled CLI executable (`build/secure_file_manager.exe`) for all cryptographic operations. Make sure the CLI is built before launching the GUI.
## Running Tests
```bash
cmake --build build --target test_crypto
./build/test_crypto
```
This runs a basic roundtrip test: creates a file, encrypts it, decrypts it, and verifies the output matches the original.
## Project Structure
```
secure_file_manager/
src/
main.cpp CLI entry point
cryptography.h/cpp CryptoManager class (OpenSSL EVP API)
utils.h/cpp Utility functions
test_crypto.cpp Roundtrip encryption test
include/
utils.h Shared header
gui/
main.js Electron main process
preload.js IPC context bridge
index.html UI layout (sidebar + 5 operation panels)
styles.css Cyberpunk neon noir theme
app.js Renderer logic
package.json Electron dependency
CMakeLists.txt Build configuration
```
## License
See repository for license details.