共用方式為


PFN_CSP_PAD_DATA function pointer

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

The PFN_CSP_PAD_DATA function pads a data buffer for use in a cryptographic operation when the smart card itself does not perform data padding.

Syntax

typedef DWORD ( WINAPI *PFN_CSP_PAD_DATA)(
  _In_  PCARD_SIGNING_INFO pSigningInfo,
  _In_  DWORD              cbMaxWidth,
  _Out_ DWORD              *pcbPaddedBuffer,
  _Out_ PBYTE              *ppbPaddedBuffer
);

Parameters

pSigningInfo [in]

A pointer to the CARD_SIGNING_INFO structure that specifies the data to pad and the hashing algorithm used to sign the data.

cbMaxWidth [in]

The maximum size, in bytes, of the padded buffer.

pcbPaddedBuffer [out]

A pointer to a DWORD value that specifies the size, in bytes, of the ppbPaddedBuffer array.

ppbPaddedBuffer [out]

The address of a pointer to an array of byte values that, on output, contains the padded data. When you have finished using the ppbPaddedBuffer array, free it by calling the PFN_CSP_FREE function.

Return value

If the function succeeds, the function returns zero.

If the function fails, it returns a nonzero error value.

Remarks

Currently, only PKCS #1 version 1.1 padding is supported.

Requirements

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

See also

Microsoft Base Smart Card Cryptographic Service Provider