Crescendo SDK
|
The CrescendoDLL.PCSC.APDUEngine class contains references to applet objects, their current properties and all the necessary internal methods to allow PCSC communication with the SmartCard. More...
Public Member Functions | |
void | Dispose () |
Releases all resources used by this instance. | |
void | EndTransaction () |
Ends the current smart card transaction, releasing exclusive access while maintaining the token's state. | |
async Task | MaintainTransactionAsync (CancellationToken ct) |
Maintains an active smart card transaction by periodically checking the SCardStatus (in 2.5 second intervals). | |
void | StartTransaction () |
Begins a smart card transaction, establishing exclusive access to the token. | |
Public Attributes | |
CommandApdu | LastCommand = default! |
Last APDU command send to the token. | |
string | LastError = default! |
String description of the last APDU error received from the token. | |
Response | LastResponse = default! |
Last APDU response received from the token. | |
byte[] | TokenATR = default! |
ATR (Answer To Reset) message output of the token. | |
string | TokenName = string.Empty |
String name of the token. | |
The CrescendoDLL.PCSC.APDUEngine class contains references to applet objects, their current properties and all the necessary internal methods to allow PCSC communication with the SmartCard.
|
inline |
Releases all resources used by this instance.
This method:
Successful disconnection is logged at DEBUG level.
Exception | Thrown if disconnection from the reader fails (SCardError != Success ). |
References CrescendoDLL.PCSC.APDUEngine.EndTransaction().
Referenced by CrescendoDLL.SDKCore.Dispose().
|
inline |
Ends the current smart card transaction, releasing exclusive access while maintaining the token's state.
Exception | Thrown if the transaction cannot be properly ended (SCardError != Success ). |
Uses SCardReaderDisposition.Leave to preserve the token's state after transaction completion. Successful execution is logged at DEBUG level.
Referenced by CrescendoDLL.PCSC.APDUEngine.Dispose().
|
inline |
Maintains an active smart card transaction by periodically checking the SCardStatus
(in 2.5 second intervals).
ct | CancellationToken used to terminate the keep-alive loop gracefully. |
Exception | Thrown if the status check fails during the transaction maintenance. |
This method prevents transaction timeouts by performing status checks every 2.5 seconds. It automatically terminates when cancellation is requested via the token.
|
inline |
Begins a smart card transaction, establishing exclusive access to the token.
Exception | Thrown if the transaction cannot be started (SCardError != Success ). |
This method initiates a transaction that maintains exclusive access to the token until CrescendoDLL.PCSC.APDUEngine.EndTransaction is called. Successful execution is logged at DEBUG level.
CommandApdu CrescendoDLL.PCSC.APDUEngine.LastCommand = default! |
Last APDU command send to the token.
string CrescendoDLL.PCSC.APDUEngine.LastError = default! |
String description of the last APDU error received from the token.
Response CrescendoDLL.PCSC.APDUEngine.LastResponse = default! |
Last APDU response received from the token.
byte [] CrescendoDLL.PCSC.APDUEngine.TokenATR = default! |
ATR (Answer To Reset) message output of the token.
string CrescendoDLL.PCSC.APDUEngine.TokenName = string.Empty |
String name of the token.
Referenced by CrescendoDLL.SDKCore.ConfigureOATHSlot(), CrescendoDLL.SDKCore.ConfigureOCRASlot(), and CrescendoDLL.SDKCore.ConfigureStaticPassword().