Share via


CardDeriveKey Function

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 21485322280x80100004

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
Minimum supported server Windows Server 2008
Header Cardmod.h

Send comments about this topic to Microsoft

Build date: 3/5/2009