다음을 통해 공유


CardDeriveKey function

This topic is not current. For the most current information about the Smart Card API, see Smart Card Minidriver Specification.

The CardDeriveKey function, defined by a smart card module, creates a session key by using the information in the specified CARD_DERIVE_KEY structure.

Syntax

DWORD WINAPI CardDeriveKey(
  _In_ PCARD_DATA       pCardData,
  _In_ PCARD_DERIVE_KEY pAgreementInfo
);

Parameters

pCardData [in]

A pointer to a CARD_DATA structure received from a call to the CardAcquireContext function.

pAgreementInfo [in]

A pointer to a CARD_DERIVE_KEY structure that specifies the key derivation function (KDF) to use to derive the key.

Return value

If the function succeeds, the function returns zero.

If the function fails, it returns a nonzero error value or one of the following possible error values.

Return code/value Description
SCARD_E_INVALID_PARAMETER
2148532228 (0x80100004)
The pwszKDF member of the CARD_DERIVE_KEY structure specified by the pAgreementInfo parameter contains a KDF that the smart card module does not support.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Cardmod.h