Ok the problem Is i am in search of a library for C++ that includes a MD5 generator.
I found one Crypto++ that has a MD5, except that the hash is stored in a byte array of which I cannot determine how I would compare to a md5 I have stored in a string.
I would love to get this one working actualy, then I can solve my problem. What do you think byte means?
Actualy here I am instructed to replace SHA() with MD5() but the code is suposed to be the same.Code:byte const* pbData = ...; unsigned int nDataLen = ...; byte abDigest[SHA::DIGESTSIZE]; SHA().CalculateDigest(abDigest, pbData, nDataLen); // abDigest now contains the hash of pbData ... if (!SHA().VerifyDigest(abDigest, pbData, nDataLen)) throw "abDigest does not contain the right hash";
The situation is I have developed a program that generates posible keys (6 chars) and I have been told what the corect md5 checksum is, since there are so many possible matches, I need to now calculate the md5 for each possible match and compare to the md5 that was given to me.
Any ideas, all I need is a MD5 function.




Reply With Quote