Re: CryptAcquireContext Fails in Windows 98
From: Amit Rahul [MS] (arahul_at_online.microsoft.com)
Date: 05/28/04
- Next message: Rhett Gong [MSFT]: "RE: The standard that defines certificate renewal"
- Previous message: Yan-Hong Huang[MSFT]: "Re: Filecertstore private key"
- In reply to: Agnihotri: "Re: CryptAcquireContext Fails in Windows 98"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 27 May 2004 23:41:46 -0700
Try the newsgroup microsoft.public.security.crypto. I am sure people there
can help you out with this real quick.
--
Thanks,
Amit Rahul [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Agnihotri" <anonymous@discussions.microsoft.com> wrote in message
news:FF4CB3B0-AE3E-4440-ABD7-7B5B4B3C0045@microsoft.com...
> Hi,
> Thanks a lot for the help now it is working but other function of the
CryptoAPI fails.
> The failing function is "CryptDeriveKey"
> if have used this function in the following way:
> if(!CryptAcquireContext(&hCryptProv,NULL, MS_DEF_PROV , PROV_RSA_FULL,
CRYPT_NEWKEYSET))
> {
> if(!CryptAcquireContext(&hCryptProv, NULL, MS_DEF_PROV,
PROV_RSA_FULL,CRYPT_NEWKEYSET|CRYPT_MACHINE_KEYSET))
> {
> return E_FAIL;
> }
> }
> if(!CryptCreateHash(hCryptProv, CALG_MD5, 0, 0, &hHash))
> {
> return E_FAIL;
> }
> if(!CryptHashData(hHash, (BYTE *)szPassword, strlen(szPassword), 0))
> {
> return E_FAIL;
> }
> if(!CryptDeriveKey(hCryptProv, ENCRYPT_ALGORITHM, hHash, KEYLENGTH,
&hKey))
> {
> return E_FAIL;
> }
>
> i tried to use GetLastError but it returned 0.
>
> Please help me out.
> Thank You
>
>
- Next message: Rhett Gong [MSFT]: "RE: The standard that defines certificate renewal"
- Previous message: Yan-Hong Huang[MSFT]: "Re: Filecertstore private key"
- In reply to: Agnihotri: "Re: CryptAcquireContext Fails in Windows 98"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|