Smart-Card-Library-pyGlobalPlatform Code
A free opensource globalplatform library for java card and smartcard.
Brought to you by:
javacardos
File | Date | Author | Commit |
---|---|---|---|
pyGlobalPlatform | 2016-07-27 | unknown | [fee45d] ADD: Add test code. |
README.md | 2016-07-27 | JavaCardOS | [9ca551] Update README.md |
pyGlobalPlatform-usage.png | 2016-07-27 | unknown | [fee45d] ADD: Add test code. |
pyGlobalPlatform.png | 2015-11-23 | unknown | [a75284] ADD: More README text. |
pyGlobalPlatform is a open source python globalplatform client library. It is depend on the GlobalPlatform project. Using this library, you can use all features of GlobalPlatform project use Python programming language.
Open source project: GlobalPlatform
from pyGlobalPlatform import globalplatformlib as gp
context = gp.establishContext()
readers = gp.listReaders(context)
print 'List readers:'
for i in range(len(readers)):
reader = readers[i]
print ' %d - ' %(i) + reader
reader = 'Feitian R502 Contactless Reader 0'
print 'Connect to reader: ' + reader
connection = gp.connectCard(context, reader, gp.SCARD_PROTOCOL_T1)
cmd = '\x00\xA4\x04\x00\x00'
print '>> ' + ''.join('%02X' %(ord(b)) for b in cmd)
rsp = gp.sendApdu(context, connection, None, '\x00\xA4\x04\x00\x00')
print '<< ' + ''.join('%02X' %(ord(b)) for b in rsp)
For more api usage examples, please visit pyGlobalPlatform Developer's Guide.
See GlobalPlatform Library API reference for more details about API.
Provide cmake script, this project can be compiled for use on both windows and linux platform. For more details, please visit our forum JavacardOS pyGlobalPlatform Discussions.
Introduce the usage of library APIs. Visit: pyGlobalPlatform Developer's Guide
If you have any questions, please visit: JavacardOS pyGlobalPlatform Discussions