Re: AES cryptographic provider
From: shiva (shiva_at_discussions.microsoft.com)
Date: 02/02/05
- Next message: Paul: "ntoskrnl.exe problems with W2k3 Server - PLEASE HELP"
- Previous message: Pavel Lebedinsky: "Re: Client/server application and Windows Integrated Auth"
- In reply to: Doug Barlow: "Re: AES cryptographic provider"
- Next in thread: Doug Barlow: "Re: AES cryptographic provider"
- Reply: Doug Barlow: "Re: AES cryptographic provider"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 2 Feb 2005 02:11:02 -0800
Hi doug
Thanks...
iam running windows xp and also windows 2000..
As u said i had changed the cryptacquirecontext parameters.
but now iam getting the error as "keyset not defined"
if(CryptAcquireContext(
&hCryptProv,
NULL,
NULL,
PROV_RSA_AES,
CRYPT_VERIFYCONTEXT))
please help me to resolve this issue
regards
shiva
"Doug Barlow" wrote:
> If you're running on Windows XP, the MS_ENH_RSA_AES_PROV string is wrong.
> If you expressly want the Microsoft AES CSP on Windows XP, change it to
>
> > NULL,
> > MS_ENH_RSA_AES_PROV" (Prototype)",
> > PROV_RSA_AES,
>
> An alternative is to specify the provider type (PROV_RSA_AES) and NULL for
> the provider name, and it will give you the default provider for that type.
> That way you don't have to worry about getting the provider name right.
>
>
> Also (since you're using 'NULL' as the container name), if you don't need
> persisted keys, change the last parameter from '0' to 'CRYPT_VERIFYCONTEXT',
> just to avoid other problems down the road.
>
> Doug Barlow
> The Soft Pedal Shop
> CSP Design & Development Consulting
> http://www.SoftPedal.net
>
> --
> "shiva" <shiva@discussions.microsoft.com> wrote in message
> news:DD03AF4D-C733-4165-B76E-C3102CA459D8@microsoft.com...
> > iam trying to do a file encryption using AES.
> > iam finding the probelm in cryptaquirecontext as keyset not defined
> >
> > the following is the code that iam using
> >
> > f(CryptAcquireContext(
> > &hCryptProv,
> > NULL,
> > MS_ENH_RSA_AES_PROV,
> > PROV_RSA_AES,
> > 0))
> > {
> > printf("A cryptographic provider has been acquired. \n");
> > }
> > else
> > {
> > MyHandleError("Error during CryptAcquireContext!");
> > }
> >
> > please help me to resolve this issue
> >
> > regards
> > shiva
>
>
>
- Next message: Paul: "ntoskrnl.exe problems with W2k3 Server - PLEASE HELP"
- Previous message: Pavel Lebedinsky: "Re: Client/server application and Windows Integrated Auth"
- In reply to: Doug Barlow: "Re: AES cryptographic provider"
- Next in thread: Doug Barlow: "Re: AES cryptographic provider"
- Reply: Doug Barlow: "Re: AES cryptographic provider"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|