I gather that this is creating an md5 hash, but confused about exactly what is being hashed.
char val1[4] = {...};
DWORD val2 = ...;
CryptCreateHash(hCryptProv, CALG_MD5, 0, 0, &hHash) // Creates hash object
CryptHashData(hHash, reinterpret_cast<const PBYTE>(val1), sizeof(val1), 0) // perform hash #1
CryptHashData(hHash, reinterpret_cast<const PBYTE>(val2), sizeof(val2), 0) // perform hash #2
How is hash #1 being combined with hash #2?
Is it performing an md5( md5(val1) + val2 )? or an md5( val1 + val2 )? Or something I’m not considering at all?
CryptHashDataadds your data to the hash object. If you callCryptGetHashParamlater you are going to get the hash of val1+val2.