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緩沖區(qū),然后附加一個KEY,如上例子就是對
{'1','2''3''4''5''6',0x17,0x51,0x85,0x7F}
這樣的一個字串進行HASH加密
CryptHashData(hHash,PASSWDBUF,0x12,NULL)
;PASSWDBUF是大寫的passwd緩沖區(qū),然后附加一個KEY 005F9E3E:
CryptGetHashParam(hhash,2,&passwdout,&outlen,0);
取出passwdbuf是小寫的passwd的加密值
CryptGetHashParam(hHash,2,&PASSWDOUT,&OUTLEN,0); |