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/valueDescription
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

Minimum supported server

Windows Server 2008

Header

Cardmod.h

 

 

Send comments about this topic to Microsoft

Build date: 4/19/2011

Show: