[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. :)
Re: (Cryptography) CPImportKey function
Re: (Cryptography) CPImportKey function
D'oh, of course!
Thank you!
:D