Re: [Help] Create HMAC
From: Mark_Pryor (marks.pryorCHENEY_at_SHRUBverizon.net)
Date: 03/17/04
- Next message: henghuei: "zero knowledge"
- Previous message: nick: "use of WlxGetOption() with WLX_OPTION_SMART_CARD_INFO"
- In reply to: Kevin: "[Help] Create HMAC"
- Next in thread: Kevin: "Re: [Help] Create HMAC"
- Reply: Kevin: "Re: [Help] Create HMAC"
- Reply: Kevin: "Re: [Help] Create HMAC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 16 Mar 2004 22:29:33 -0800
"Kevin" <kevin13@email.yfp.com.tw.NO_SPAM> wrote in message
news:uk197g8CEHA.3280@TK2MSFTNGP09.phx.gbl...
> I tried to create a hmac just like MSDN said.
> I generated a session key, and tried to use this key to create a hash:
> CryptCreateHash(hProv, CALG_HMAC, hKey, 0, &hHash);
> It works fine.
> But it always failed when I tried to hash data:
> CryptHashData(hHash, (BYTE*)"test string", strlen("test string") + 1, 0);
> Return code is 0x80090008 (NTE_BAD_ALGID), means this CSP doesn't
support!?
> Is there any thing I do wrong or I miss?
>
> BTW, I'm using Microsoft Base Cryptographic Provider v1.0 for my CSP.
>
>
The Base Provider will support HMAC, as long as
you specify the hash type.
What about passing the _HMAC_Info structure into
CryptSetHashParam? The first member of this struc
is the Hash Alg_ID.
What CALG_ did you use to derive your hKey? Only
40 bit RC4-RC2, or 56 bit DES are sure to work.
good luck,
msp
- Next message: henghuei: "zero knowledge"
- Previous message: nick: "use of WlxGetOption() with WLX_OPTION_SMART_CARD_INFO"
- In reply to: Kevin: "[Help] Create HMAC"
- Next in thread: Kevin: "Re: [Help] Create HMAC"
- Reply: Kevin: "Re: [Help] Create HMAC"
- Reply: Kevin: "Re: [Help] Create HMAC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|