Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

CryptoAPI setting initial hash value

$
0
0

I have a requirement to hash some data using MD5. 

What I am needing the the ability to set the initial value of the MD5 has prior to the first CryptHashData call. 

This should be a simple process but I haven't found the correct method to do this.  My code, currently, does a CryptCreateHash with algorightm CALG_MD5 to get a hash handle (no key provided).  The next step was to then call CryptSetHashParam setting the HP_HASHVAL but this set the hash into a "final" state so that the next call to CryptHashData gets a NTE_BAD_HASH_STATE (0x8009000C). 

Any assistance with this would be greatly appreciated.

 

Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>