The PC/SC API also called WinSCard can be used from a large variety of languages. I will start a serie of blogs to present the same program (functionnally) but using different languages.
Languages:
- C
- Perl
- Python
- scriptor
- OCaml
- Prolog
- Ruby
- Java
- C#
- Ada
- PHP (dead upstream as 11 January 2015)
- PHP5
- lua
- JavaScript (Node.js)
- Python (using python-pcsclite)
- Common Lisp
- C for UEFI
- Objective-C (using Crypto Token Kit)
- Swift (using Crypto Token Kit)
Program
The program shall do:- connect to the first found smart card reader
- send APDU:
00 A4 04 00 0A A0 00 00 00 62 03 01 0C 06 01
- display result
- send APDU:
00 00 00 00
- display result
Smart card Applet
The applet only knows one command and returnsHello world!
(yes, it is a test applet). It was described in a French magazine GNU/Linux Magazine HS n°39.
ConversionConversion EmoticonEmoticon