1. Start a new Console Application project in your IDE
2. Download the file I have attached, unzip the files somewhere, and place them in the same folder as your project. Make sure you add them to the projects file list.
3. You will need to include the md5wrapper header:
#include "md5wrapper.h"
4. In your main function, put in this code, I have commented about what things do:
// This will allow us to access the md5wrapper class. md5wrapper md5; // This will store the md5 hash of a file called test.txt in a string hash1 std::string hash1 = md5.getHashFromFile("test.txt"); // This will store the md5 hash of some text into a string hash2 std::string hash2 = md5.getHashFromString("Hello World"); // This will print, the hash from the file and from the string std::cout << hash1 << std::endl; << hash2 std::endl; system("PAUSE"); // Remove if your using Linux. return 0;
5. Edit the above code to make it do what you want, I have tried to make it as obvious as to how you can use it properly.
6. Enjoy. And +rep me
