To implement HMAC-MD5 crypto algorithm in an Win32 application

别等时光非礼了梦想. 提交于 2019-12-23 05:01:58

问题


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.



来源:https://stackoverflow.com/questions/7103961/to-implement-hmac-md5-crypto-algorithm-in-an-win32-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!