Condividi tramite


CardRSADecrypt function

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

The CardRSADecrypt function, defined by a smart card module, performs an RSA decryption of the specified data by using the specified private key. The decryption operation must be for a single data buffer of the same size as the key modulus.

Syntax

DWORD WINAPI CardRSADecrypt(
  _In_    PCARD_DATA             pCardData,
  _Inout_ PCARD_RSA_DECRYPT_INFO pInfo
);

Parameters

pCardData [in]

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

pInfo [in, out]

A pointer to a CARD_RSA_DECRYPT_INFO structure that specifies the data to decrypt and the private key to use for the decryption. On output, the structure contains the decrypted data.

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_INSUFFICIENT_BUFFER
2148532231 (0x80100007)
The pbData member of the pInfo parameter is not of sufficient size.

Remarks

Card modules that support only elliptic curve cryptography (ECC), do not implement this function.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cardmod.h