The best/easiest solution now is to use CAPICOM 2 functionality:
(unless you have very unusual requirements, in which case you may
need to use capi directly).
There are excellent samples in the CAPICOM 2 download for:
asp, c#, C++, html, vb, vbs
The CAPICOM 2 install is rather small :-) and is supported on
Win98 - XP (and also the 188.8.131.52 version seems to work in most
cases on Win95).
- Michel Gallant
> I want to use the key pair of a stored X509Certificate to encrypt and
> decrypt data.
> I haven't found a solution for a few problems I have:
> Is there a way to generate a X509Certificate of a keypair in a self written
> program with the windows api?
> How can I get the private key/public key belonging to a X509 certifcate
> (stored in the windows certificate store) and decrypt/encrypt some data with
> Examples will be nice!
> I prever a solution with .NET Framework or COM (capicom.dll), but C/C++-Code
> will also fine.
> Andreas Siglreithmayr