Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[This property is no longer available for use as of Windows Server 2008 and Windows Vista.]
The KeySpec property sets or retrieves the type of key generated.
Valid values are determined by the cryptographic service provider (CSP) in use. This property was first defined in the ICEnroll interface.
This property is read/write.
HRESULT get_KeySpec(
LONG *pdw
);
pdw
None
For the Microsoft Base Cryptographic Provider, the KeySpec property has a value of AT_KEYEXCHANGE for exchange keys, or AT_SIGNATURE for signature keys. The default is AT_SIGNATURE.
For information about the other Microsoft CSPs, see Cryptographic Service Providers in the CryptoAPI 2.0 documentation.
For information about other CSPs, see the documentation provided with the CSP.
The KeySpec property affects the behavior of the following methods:
DWORD dwKeySpec;
HRESULT hr;
// pEnroll is previously instantiated ICEnroll interface pointer
// get the KeySpec value
hr = pEnroll->get_KeySpec( &dwKeySpec );
if (FAILED( hr ))
printf("Failed get_KeySpec - %x\n", hr );
else
printf( "KeySpec: %d\n", dwKeySpec );
// set the KeySpec value
hr = pEnroll->put_KeySpec( AT_KEYEXCHANGE );
if (FAILED( hr ))
printf("Failed put_KeySpec - %x\n", hr );
else
printf( "KeySpec set to %d\n", AT_KEYEXCHANGE );
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | xenroll.h |
Library | Uuid.lib |
DLL | Xenroll.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today