Export (0) Print
Expand All

ICspInformation::KeySpec property

The KeySpec property retrieves a value that specifies the intended use of the algorithms supported by the provider. This property is web enabled.

This property is read-only.

Syntax


HRESULT get_KeySpec(
  [out]  X509KeySpec *pValue
);

Property value

Pointer to an X509KeySpec enumeration value. This value can be XCN_AT_NONE or a combination of one or more of the following values.

ValueMeaning
XCN_AT_KEYEXCHANGE (1)

The key can be used for symmetric encryption or signing or both, depending on the algorithm.

XCN_AT_SIGNATURE (2)

The key can be used for signing.

 

Error codes

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

NameMeaning
OLE_E_BLANK

The ICspInformation object has not been initialized.

Remarks

The value retrieved can be 0, 1, 2, or 3. If the value is 0 (XCN_AT_NONE), the provider is a Cryptography API: Next Generation (CNG) provider. The values associated with the providers distributed by Microsoft are listed in the following table. Some of these providers may not be included on all operating systems and others may be included instead.

ProviderKeySpec value

Microsoft Software Key Storage Provider

0

Microsoft Smart Card Key Storage Provider

0

Microsoft Base Cryptographic Provider v1.0

3

Microsoft Base DSS and Diffie-Hellman Cryptographic Provider

3

Microsoft Base DSS Cryptographic Provider

2

Microsoft Base Smart Card Crypto Provider

3

Microsoft DH Schannel Cryptographic Provider

3

Microsoft Enhanced Cryptographic Provider v1.0

3

Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider

3

Microsoft Enhanced RSA and AES Cryptographic Provider

3

Microsoft RSA Schannel Cryptographic Provider

1

Microsoft Strong Cryptographic Provider

3

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

ICspInformation

 

 

Community Additions

ADD
Show:
© 2014 Microsoft