Search Wiki:
MFC MD5 Calculator
C++ MFC application that calculates MD5 digest of files, using worker threads. The MD5 calculator C++ class can be used also in non-MFC projects.

This is a C++ MFC application that computes the MD5 digest of files, using worker threads.

The input file can be selected from the app main dialog box, or it can be drag-and-drop'ed by the user.

The MD5 computation is done by a "background" worker thread.
(See CMfcMD5CalculatorDlg::MD5WorkerThreadFunctionMain() method.)

MD5 digest can be copied to the clipboard.

Some techniques showed in this project:

* MD5 calculation using Win32 Cryptography API (no external libraries required)
* using worker threads
* drag-and-drop
* copy strings to clipboard
* extracting file path and file title from full file pathname
* using common open file dialog

The CMD5FileCalculator class is used to calculate MD5 digest of files.
I designed this class to be independent from the MFC framework, so this class can be used also in other C++ non-MFC projects.

Giovanni Dicanio

2008, September 26th
Last edited Sep 27 2008 at 10:01 AM  by GiovanniD, version 3
GiovanniD wrote  Sep 27 2008 at 1:32 PM  
I added the following downloads:
* a sample console application to show the use of the "core" MD5 C++ class in a context much simpler than that of an MFC GUI app.
* a PowerPoint presentation describing the CMD5FileCalculator class usage.

Giovanni Dicanio
2008, September 27th

Page view tracker