Re: CryptImportKey() & CryptExportPublicKeyInfo()
From: Petar Popara (my.fake_at_mail.net)
Date: Mon, 18 Apr 2005 16:10:57 +0200
To advanced for me. :( I'll need to ask additional questions here (see
> You need to first ANS.1 encode the PublicKey, from the PUBLICKEYBLOB
> data, using CryptEncodeObject with lpszStructType = RSA_CSP_PUBLICKEYBLOB
I couldn't figure out what structure CryptEncodeObject() returns for
lpszStructType=RSA_CSP_PUBLICKEYBLOB? It returns CRYPT_BIT_BLOB with
different encoding (e.g. PKCS1) then it was on input?
> Then you construct a CERT_PUBLIC_KEY_INFO with that returned
> encoded public key:
pki.Algorithm = szOID_RSA; //???
pki.PublicKey = stucure returned from CryptEncodeObject().
Something like this?
> See also:
There are 3 links and first is broken.
Thank you very very much. :)