![]() |
Game files integrity check - XHash Library
6 Attachment(s)
XHashEx v2.0 File Hashing & Checksum Verification API for Inno Setup 84 algorithms · multi-threaded · Win32 DLL (32 & 64-bit Windows) · by BLACKFIRE69 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━ ▌ OVERVIEW XHashEx is a lightweight, high-performance hashing library crafted for Inno Setup. It generates and verifies checksum files for entire folders, hashes single files, and exposes 84 hashing algorithms — from fast CRC32/XXHash to the full cryptographic suite (SHA-2, SHA-3, BLAKE2/3 …) — all from a single DLL with live per-file and overall progress tracking. Ideal for verifying the integrity of downloaded payloads, large data sets, or already-installed files before continuing an installation. ▌ TECHNICAL SPECIFICATIONS
▌ WHAT'S NEW (v2.0) ⚠ BREAKING CHANGE — No Backward Compatibility Every exported function was renamed with an XH_ prefix and a cleaner name (e.g. CalculateHashesForDir → XH_GenerateDir). v1.x scripts will not work until imports are updated — swap to the bundled XHashEx.iss header. The ProcessMessages export was removed entirely; the DLL pumps the message queue itself. ✦ Multi-Threading Support (NEW) Hash many files in parallel via a worker-thread pool, count selectable at runtime with XH_SetThreadCount (XH_THREADS_SINGLE / N / XH_THREADS_AUTO). OFF by default — opt in with one call. ✦ Light Callback Mode (NEW) On folders with tens of thousands of files, per-file callback crossings into Pascal Script dominate the runtime, not the hashing. XH_SetCallbackMode(XH_CALLBACK_LIGHT) keeps directory runs fast in BOTH thread modes: failures/missing/final file are always reported, plus a ~10×/s sampled tick — the log still records every file. OFF by default. ✦ Measured Performance (28,036 files · xxHash32 · SATA SSD · Windows 11) Code:
╭───────────────────┬──────────────────────┬──────────────┬───────────╮✦ Byte-Weighted Progress (NEW) Overall progress reflects the share of BYTES hashed, so the bar moves smoothly even when file sizes vary wildly. Toggle with XH_SetProgressMode (on by default). ✦ Accurate MT Progress + Instant Pause In MT runs the overall percent tracks exactly what's reported to your callback — it reaches 100% precisely when the run finishes — and Pause/Resume/Cancel take effect immediately even under heavy load. ✦ Significant Performance Improvements Throughput scales with cores (auto-capped to keep disk access sane), no extra per-file metadata pass before hashing, each worker reuses its hash object across files, and the DLL pumps the message queue itself. ✦ New High-Performance File Search Engine The old file-search code is replaced with a faster wide-API scanner customized for hashing (lean path-only mode), pre-compiled wildcard masks, and full case-insensitive $"regex" support. ✦ Expanded Algorithm Set The full cryptographic suite is now exposed — 80+ algorithms total (added SHA-224/384, SHA-3/Keccak, RIPEMD-160/320, WhirlPool, BLAKE2B/2SP/2BP, GOST, Snefru, Tiger/Haval variants …). ✦ Unicode Fixes Checksum and log files are written/read as UTF-8, so non-Latin file names (Cyrillic, CJK …) round-trip correctly instead of being mangled. ✦ Performance Upgrade Read buffer and hash object reused across files (no per-file alloc), files opened once with sequential-scan I/O, and progress callbacks throttled to whole-percent changes. ✦ Bug Fixes & Stability Fixed a UI-freeze regression during long operations, corrected progress reporting on the verification path, and various smaller fixes. ✦ Refreshed Example & Docs A new, comprehensive Inno Setup 6 demo (XHashEx_Example.iss) with a Multi-threaded toggle (paired with light callback mode), a live Elapsed / Speed / ETA readout, and a final Duration + average-throughput summary — plus an updated quick-reference. ▌ KEY FEATURES ✦ Directory Checksum Generation Recursively hash an entire folder into a single checksum file (.md5/.sha1/.sha256/.sfv …), one algorithm per run. ✦ Checksum Verification Verify files against a checksum file with an explicit algorithm, or in auto-detect mode (CRC32/MD5/SHA1/SHA256/SHA512) for mixed-algorithm lists. ✦ Single-File Hashing Compute and return the digest of one file, or verify it against a known hash. ✦ Powerful File Selection (Masks) Include/Exclude using wildcards, sub-folders, @list files, and case-insensitive $"regex" patterns — mix freely with '|'. ✦ Multi-Threaded Hashing Optionally hash in parallel across a worker-thread pool (selectable count, or auto). Result callbacks stay on your calling thread — safe to enable with no other code changes. ✦ Live Progress Tracking Per-file %, overall % (byte-weighted by default), file size, bytes processed, total file count, per-file status (Ok / Bad / Missing). ✦ Process Control Pause, Resume, and Stop a running operation safely at any point. ✦ Customizable Logging Optional log file with fully customizable log message strings. ✦ Checksum File Comments Write custom comment lines into the header of the generated checksum file. ✦ Attribute Control Optionally include hidden and/or system files when scanning. ✦ Performance Tuning Adjustable read buffer (default 4 MB) for max throughput on very large files; hash object + buffer reused across files. ✦ Full Unicode Support Non-Latin file names handled correctly; checksum and log files written as UTF-8. ✦ Previous-Hash Cache Append new results to existing in-memory hashes to build cumulative checksum files across multiple passes. ✦ Bonus: File Search / Enumeration API A built-in wide-API file scanner (wfs_*) for listing files/directories by the same mask/regex syntax, with optional per-file size, attributes, and CRC32. ▌ SUPPORTED ALGORITHMS (80+ total) Code:
╭───────────────────┬──────────────────────────────────────────────────────╮▌ MASKS (Include / Exclude) Matched against the file's RELATIVE path + name, combined with '|'. Blank or '*' means all files. Code:
*.dll|*.exe wildcards / extensions(v1.x names in parentheses)
▌ QUICK START EXAMPLES Example 1 — Generate a checksum file for a folder Code:
#include "XHashEx.iss"Code:
case XH_VerifyDir(Code:
// auto-detect handles CRC32/MD5/SHA1/SHA256/SHA512Code:
Digest := XH_HashFile(Code:
XH_SetIncludeAttribs(True, False); // include hidden, not system
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━ Feedback, bug reports and suggestions are welcome. Enjoy! — BLACKFIRE69 . |
XHash Update 1.1v
XHash Update 1.1v
_ |
I am appreciating your work friend. Your tools are pretty cool
|
Quote:
To This Script |
XHash New Update
Update available! What's New:
ChecksumX Code:
USAGE:_ |
Hello. Your file is good, but if I use the VclStyle skin, when the dll file wants to show the error box, the installation file closes suddenly. can you remove the error box from dll :D?
|
Quote:
|
Quote:
See the error in this link:) |
Quote:
if this doesn't work either, send me your sample script so i can take a look. . |
Quote:
|
1 Attachment(s)
Quote:
Try with the script attached. |
XHash_Next v1.0
XHash_Next v1.0
Quote:
Code:
hash_mixed.md5Quote:
thanks to @Cesar82 for the suggestions for the XHash_Next and testing it. . |
XHash_Next - Update
XHash_Next - Update
Quote:
|
Thanks for all these BLACKFIRE69, nice work, keep it up :)
|
XHashNext - Update
XHashNext - Update
Quote:
Thanks to @Cesar82 check the first post. |
| All times are GMT -7. The time now is 04:57. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com