Crate winscard

Source
Expand description

§winscard-rs

Modules§

tlv_tags
Constants with most popular tags used in this PIV smart card implementation.
winscard
The winscard module contains traits for easier interop between WinSCard API and our emulated scard.

Structs§

Error
Represents general WinSCard error.
Reader
Describes a smart card reader.
Response
Represents a response after the APDU command execution.
ScardContext
Represents the resource manager context (the scope).
SmartCard
Emulated smart card.
SmartCardInfo
Describes smart card info used for the smart card creation.

Enums§

ErrorKind
Smart Card Return Values.
Status
Represents Status Word (SW) - a 2-byte value returned by a card command at the card edge. Table 6. Status Words

Constants§

ATR
The original winscard ATR is not suitable because it contains AID bytes. So we need to construct our own. Read more about our constructed ATR string: https://smartcard-atr.apdu.fr/parse?ATR=3B+8D+01+80+FB+A0+00+00+03+08+00+00+10+00+01+00+4D
CHUNK_SIZE
The max amount of data one APDU response can transmit.
DEFAULT_CARD_NAME
Default name of the emulated smart card.
MICROSOFT_DEFAULT_CSP
Default CSP name.
MICROSOFT_DEFAULT_KSP
Default KSP name.
MICROSOFT_SCARD_DRIVER_LOCATION
Default smart card driver location.
PIV_AID
NIST.SP.800-73-4, part 1, section 2.2.
SUPPORTED_CONNECTION_PROTOCOL
Supported connection protocol in emulated smart cards.

Functions§

ber_tlv_length_encoding
Encodes the length in BER encoding.

Type Aliases§

WinScardResult
The WinScardResult type.