-
Notifications
You must be signed in to change notification settings - Fork 2
English wiki
Welcome to the FileHash wiki!
About the FileHash.
The current programming language versions are C++Builder and Delphi version of the source code in Embarcadero RAD Studio 10 Seattle, which uses JVCL components.
All hash except CRC32 uses the algorithm in Delphi with MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_224, and SHA512_256.
Download .exe file of the compiled FileHash:
- No contain run-time library, need to install the development environment or run-time packages to execute:
32bit version(155 KB): https://1drv.ms/u/s!AEUDZpCYF5CHhhA
64bit version(257 KB): https://1drv.ms/u/s!AEUDZpCYF5CHhhE - Already include all libraries, it can be executed directly in the no development environment or run-time packages:
32bit version(2.76 MB): https://1drv.ms/u/s!AEUDZpCYF5CHhhM
64bit version(4.22 MB): https://1drv.ms/u/s!AEUDZpCYF5CHhhI
The JVCL components used are JvFilenameEdit, TJvgProgress, and TJvThread.
Uses JVCL 3.49 and CompleteJCL 2.7 Build 5676 form SourceForge project JVCL .
- JvFilenameEdit
More convenient file path edit box and support for file selection dialogs. - TJvgProgress
More detailed and instant reaction progress bar. - TJvThread
Simple to use thread.
These examples demonstrate how to use threads to handle multiple hash calculations in Delphi and C++Builder, and simply uses a secondary buffer memory space.
Using TJvThread, Note that WaitFor cannot be used in Execute of JvThread, because “Application.HandleMessage” is called internally. Since “Application.HandleMessage” is handled by the main thread, “TJvThread.WaitFor” can only be used in the main thread.
Since it is processed in the background thread, it can be modified to:
while JvThread.OneThreadIsRunning do
Sleep(1); // Optimize the response based on the performance modification value.
Although used in the source code:
repeat
Sleep(1);
until JvThread.Terminated;
So, that’s it.
Main thread to start hash calculation // Message process
.. // …
.. Sub thread to start // Here is multi-thread of hash calculation.
.. While if not set terminated do
.. {
…. Read file data
…. Call hash calculate thread and execution at the same time.
…. [
…… Hash thread CRC // Here is multi-thread of hash calculation.
…… Hash thread MD5 // Here is multi-thread of hash calculation.
…… // …
…. ]
…. Wait all hash multi process to end
.. }
.. Sub thread to end
.. // …
Main thread to end hash calculation // Message process