Share via


CardRSADecrypt Function

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 21485322310x80100007

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, Windows 2000 Professional with SP4
Minimum supported server Windows Server 2003, Windows 2000 Server with SP4
Header Cardmod.h

Send comments about this topic to Microsoft

Build date: 3/5/2009