Re: CryptAcquireContext Fails in Windows 98

From: Amit Rahul [MS] (arahul_at_online.microsoft.com)
Date: 05/28/04


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
>
>


Relevant Pages

  • Mah-Jongg FAQs updated
    ... FAQ 7f - Added a site that makes an American mah-jongg table expander. ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Re: Mahjong FAQs updated
    ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... American Mah-Jongg FAQs ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Mah-Jongg FAQs updated
    ... FAQ 7f - Added a Chinese manufacturer of automatic mahjong tables. ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Re: Mah Jongg Newsgroup FAQs updated
    ... FAQ 23 - Fixed a broken link, ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)
  • Mah-Jongg FAQs updated
    ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... American Mah-Jongg FAQs ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)