ICEnroll4::KeySpec property

[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.

Syntax


HRESULT put_KeySpec(
  [in]   LONG Spec
);

HRESULT get_KeySpec(
  [out]  LONG *pSpec
);

Property value

A Long that represents the type of key generated. The value of this property depends on the CSP in use. For more information, see Remarks.

Error codes

If the property access methods put_KeySpec and get_KeySpec succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

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:

Examples


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 );

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Xenroll.h

Library

Uuid.lib

DLL

Xenroll.dll

IID

IID_ICEnroll4 is defined as c1f1188a-2eb5-4a80-841b-7e729a356d90

 

 

Community Additions

ADD
Show:
© 2014 Microsoft