A desktop SHA-256 verification toolkit with two implementations:
- Python + Tkinter version
- C++ Win32 + Windows CNG (BCrypt) version
Verify file integrity by comparing a calculated SHA-256 hash with a trusted hash.
- Browse and select a local file
- Calculate SHA-256 for the selected file
- Compare calculated hash against an expected hash
- Show clear match or mismatch result
- Dedicated
Read Hashflow in the C++ app - Input normalization and basic path hardening in the C++ app
| Variant | UI | Hashing | Build/Runtime |
|---|---|---|---|
| Python version | Tkinter | hashlib.sha256 |
Python 3 |
| C version | Win32 API | Windows CNG (bcrypt) |
CMake + C++17 |
SHA-256_File_Verifier/
|-- python version/
| `-- main.py # Python Tkinter verifier
|-- C version/
| |-- main.cpp # C++ Win32 verifier
| |-- CMakeLists.txt # CMake build config
| `-- build.ps1 # PowerShell build helper
`-- README.md # Project documentation
- Python folder:
python version - C++ folder:
C version - Python app file:
python version/main.py - C++ app file:
C version/main.cpp - Build script:
C version/build.ps1 - CMake config:
C version/CMakeLists.txt
git clone https://github.com/BnHany/SHA-256_File_Verifier
cd SHA-256_File_Verifier- Python 3.10 or newer
cd "python version"
python main.py- CMake 3.16+
- A C++17-compatible Windows compiler (MSVC or MinGW)
- PowerShell
cd "C version"
.\build.ps1 -Config ReleaseOptional clean rebuild:
.\build.ps1 -Config Release -CleanAfter build, run one of:
.\build\hash_verifier_gui.exe
.\build\Release\hash_verifier_gui.exe- Select a file.
- Enter the trusted SHA-256 hash (64 hex characters).
- Click verify:
- Python app:
Verify - C++ app:
Verify Hash Match
- Read the result dialog for match/mismatch.
- SHA-256 hashes are displayed in lowercase hex.
- The C++ app performs extra path and file-type validation before hashing.
If you want to understand the internal implementation, security considerations, and design decisions behind the SHA-256 File Verifier (both Python and C++ versions), refer to the detailed documentation below:
This documentation is helpful for learners, security students, and developers who want to explore how SHA-256 verification is implemented across different stacks.
BnHany
Built with ❤️ to simplify file integrity verification for everyday users. Contributions, issues, and feature requests are welcome.
This project is licensed under the MIT License.
Feel free to use, modify, and distribute. Please give proper credit and use responsibly.