-
November 11th, 2009, 10:52 AM
#1
[RESOLVED] (Cryptography) CPImportKey function
For the actual question, please see below the [ code ] section, but first some background:
The CPImportKey function is listed in Visual Studio 2005's MSDN as being part of the "Platform SDK: Cryptography" and as available on pretty much all versions of Windows.
The function is also documented here as being available on Windows 2000 onwards:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Both sources however state that the required header file needs to be downloaded as part of the Cryptographic Service Provider Developer's Kit.
While that SDK does indeed contain the header (Cspdk.h) it does not contain any .lib file.
Most bizarly, this SDK contains a DLL which merely has skeleton version of CPImportKey:
Code:
BOOL WINAPI
CPImportKey(
IN HCRYPTPROV hProv,
IN CONST BYTE *pbData,
IN DWORD cbDataLen,
IN HCRYPTKEY hPubKey,
IN DWORD dwFlags,
OUT HCRYPTKEY *phKey)
{
*phKey = (HCRYPTKEY)NULL; // Replace NULL with your own structure.
return TRUE;
}
So ... is the CPImportKey function actually implemented by Microsoft somewhere? If so, which DLL ?
If not, how can I import a Key BLOB which was exported using .net's RSACryptoServiceProvider.ExportCspBlob ?
Thanks.
Last edited by Zaccheus@Work; November 11th, 2009 at 11:00 AM.
The CodeGuru member formerly known as Zaccheus.
-
November 11th, 2009, 12:25 PM
#2
Re: (Cryptography) CPImportKey function
-
November 11th, 2009, 03:00 PM
#3
Re: (Cryptography) CPImportKey function
D'oh, of course!
Thank you!
The CodeGuru member formerly known as Zaccheus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|