I writing a program in Delphi 2010. Part of the program deals with File Hashing, which with large files takes a rather long time. The problem I have is while the program is away hashing the file the user wants, the program currently hangs for upto 60 seconds on a 100MB file. I want the user to be able to go use the other features of the program (Memopad, String Hashing) while the file hashing is taking place.
The current structure of the program is as follows :-
- User Initiates Hashing (Can be done by changing file selected or hashing algorithm's selected)
- Calls function CheckHashBox
- CheckHashBox checks if hashing algorithm is selected
- If selected calls hashing algorithms relevant function
- Hashing alogrithms function buffers the file, runs through hashing algo then prints final output to StringGrid
- Repeat steps 3 - 5 for all 12 hashing algorithms.
As I said with large files this can take up to 60 seconds, specifically Whirlpool, SHA-512 algorithms. The other strange thing is that although in the code it should print output after return for specific hashing algorithm before going onto check the next the results don't display till all have completed.
I haven't posted any actual code since all this covers a rather large amount of code, but I can post any section of code needed to help.