CryptAcquireContextW(&hProv,NULL,
L("Microsoft Base Cryptographic Provider v1.0"),1,0xf0000000);
CryptCreateHash(hProv,0x8004,NULL,NULL,&hhash);
CryptCreateHash(hProv,0x8004,NULL,NULL,&hHash);
005F9DFE:
CryptHashData(hhash,passwdbuf,0x12,NULL);
passwdbuf是小写的passwd缓冲区,然后附加一个KEY,如上例子就是对
{'1','2'3'4'5'6',0x17,0x51,0x85,0x7F}
这样的一个字串进行HASH加密
CryptHashData(hHash,PASSWDBUF,0x12,NULL)
;PASSWDBUF是大写的passwd缓冲区,然后附加一个KEY 005F9E3E:
CryptGetHashParam(hhash,2,&passwdout,&outlen,0);
取出passwdbuf是小写的passwd的加密值
CryptGetHashParam(hHash,2,&PASSWDOUT,&OUTLEN,0); |