csismartcard 2.0.4

Smart Card Library, mimicking minimum from javax.smartcardio

Install-Package csismartcard -Version 2.0.4
dotnet add package csismartcard --version 2.0.4
<PackageReference Include="csismartcard" Version="2.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add csismartcard --version 2.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

csismartcard

Minimum mimicking for javax.smartcardio
Sometimes we need to port code(s) from java to csharp and vice versa. This library tries to achieve that especially for PCSC smartcard operation. Some of methods are missing on this.

NuGet installation

see https://www.nuget.org/packages/csismartcard/2.0.4

API Example

A simple example of using the API is:

// show the list of available terminals
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals = factory.terminals().list();
terminals.list().ForEach(o => Console.WriteLine(o.getName()));
Console.WriteLine();
// get the first terminal
CardTerminal terminal = terminals.getTerminal(0);
// establish a connection with the card
Card card = terminal.connect<Card>();
Console.Write("ATR: ");
card.getATR().getBytes().ForEach(b => Console.Write("{0:X2} ", b));
Console.WriteLine();
CommandAPDU command = new CommandAPDU(cl);
ResponseAPDU response = card.getBasicChannel().transmit(command);
// disconnect
card.disconnect(false);

csismartcard

Minimum mimicking for javax.smartcardio
Sometimes we need to port code(s) from java to csharp and vice versa. This library tries to achieve that especially for PCSC smartcard operation. Some of methods are missing on this.

NuGet installation

see https://www.nuget.org/packages/csismartcard/2.0.4

API Example

A simple example of using the API is:

// show the list of available terminals
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals = factory.terminals().list();
terminals.list().ForEach(o => Console.WriteLine(o.getName()));
Console.WriteLine();
// get the first terminal
CardTerminal terminal = terminals.getTerminal(0);
// establish a connection with the card
Card card = terminal.connect<Card>();
Console.Write("ATR: ");
card.getATR().getBytes().ForEach(b => Console.Write("{0:X2} ", b));
Console.WriteLine();
CommandAPDU command = new CommandAPDU(cl);
ResponseAPDU response = card.getBasicChannel().transmit(command);
// disconnect
card.disconnect(false);

Release Notes

Add some functionality

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.4 216 8/8/2019
2.0.2 149 8/6/2019
2.0.1 162 8/6/2019