-->

To implement HMAC-MD5 crypto algorithm in an Win32

2019-06-11 15:10发布

问题:

I have a Win32 application that has to implement algorithm NTLM v2 Authentication in accordance to http://msdn.microsoft.com/en-us/library/cc236700(v=PROT.10).aspx. Partially, I need an implementation of crypto algorithm HMAC_MD5(). I see Win32 Crypto API contains function CryptCreateHash; but cannot understand: how to use it for the HMAC-MD5? Can someone explain me or give an example?

回答1:

Generic example at http://msdn.microsoft.com/en-us/library/aa382379%28v=vs.85%29.aspx. You might want to replace the CALG_SHA1 with a CALG_MD5 to get the right algorithm.

Good luck with NTLM: hairy little beast that.



标签: cryptoapi