K
Kerem Gümrükcü
Hi,
this is not a pure MFC/VC++ question but my apologizes at first.
Well, i have a application that calculates the hash for a file. You
can request a CALG_SHA1 or a CALG_MD5 for the File. The
Process of Hash Calculation works fine, but i get two totally different
Hash values for e.g. kernel32.dll when i try to get the hash with the
following steps compared to the managed .NET MD5 Provider.
The Hash "24d244d0a15ab17885d578d1c54d5294" comes from
the following steps:
CryptAcquireContextW
CryptCreateHash
CryptHashData
CryptGetHashParam, with HP_HASHSIZE
CryptGetHashParam, with HP_HASHVAL
The Hash "8eea8280a1e0e794edfccad3721c7cab"
comes from the .NET CSP "MD5CryptoServiceProvider"
and seems to be the right one (compared to other MD5 tools),
but why does the Windows API CSP return crap?
I can post code if you like (its a little bit to long to post here), but
the code works with no problems,...
Here is a screenshot if you like:
http://entwicklung.junetz.de/pics/verinfo_hash.jpg
I am a little confused,...
Regards
Kerem
--
this is not a pure MFC/VC++ question but my apologizes at first.
Well, i have a application that calculates the hash for a file. You
can request a CALG_SHA1 or a CALG_MD5 for the File. The
Process of Hash Calculation works fine, but i get two totally different
Hash values for e.g. kernel32.dll when i try to get the hash with the
following steps compared to the managed .NET MD5 Provider.
The Hash "24d244d0a15ab17885d578d1c54d5294" comes from
the following steps:
CryptAcquireContextW
CryptCreateHash
CryptHashData
CryptGetHashParam, with HP_HASHSIZE
CryptGetHashParam, with HP_HASHVAL
The Hash "8eea8280a1e0e794edfccad3721c7cab"
comes from the .NET CSP "MD5CryptoServiceProvider"
and seems to be the right one (compared to other MD5 tools),
but why does the Windows API CSP return crap?
I can post code if you like (its a little bit to long to post here), but
the code works with no problems,...
Here is a screenshot if you like:
http://entwicklung.junetz.de/pics/verinfo_hash.jpg
I am a little confused,...
Regards
Kerem
--