1.CCID smart card reader library
Developer can use this library to connect USB CCID smart card reader and send APDU commands in few lines of code. All you need to do is implement the card class and put the business logic into it.
MyCard card = null; card = (MyCard)ConnectCard("com.scdroid.smartcard.MyCard", Card.PROTOCOL_ANY); card.Select(AID);
card.ReadRecord(no);
card.BusinessLogic();
card.Disconnect();
2.EMV Card library
Please refer this library to JavaEMVReader Project on Google Code.
Developer can use this library to access the information in the EMV Card.
See what information you can get by it. example: EMVCard analysis information
EMVCard card = null; card = (MyCard)ConnectCard("com.scdroid.smartcard.EMVCard", Card.PROTOCOL_ANY);
//Select PAY1.SYS.DDF01 byte[] data = card.SelectPSE();
//Read PSE
DDF ddfPSE = EMVUtil.parseFCIDDF(data);
data = card.ReadRecord(ddfPSE.getSFI().getValue(), 1, 0);
List<Application> apps = EMVUtil.parsePSERecord(data);
//Select Application
AID aid = appList.get(0).getAID();
data = Select(aid.getAIDBytes());
Application appSelected = EMVUtil.parseFCIADF(data);
//initiate Application Processing
DOL pdol =
appSelected .getPDOL();
data = GetProcessingOptions(
pdol);
EMVUtil.parseProcessingOpts(data,
appSelected);
//read all the records indicated in the AFL
for (ApplicationElementaryFile aef : appSelected.getApplicationFileLocator().getApplicationElementaryFiles()) {
int startRecordNumber = aef.getStartRecordNumber();
int endRecordNumber = aef.getEndRecordNumber();
for (int recordNum = startRecordNumber; recordNum <= endRecordNumber; recordNum++) {
byte[] data = null;
data = card.ReadRecord(aef.getSFI().getValue(), recordNum, 0);
EMVUtil.parseAppRecord(data, appSelected);
}
}
card.Disconnect();
|
Product >