从Emv卡获取IBAN号 [英] Get the IBAN number from an emv card
问题描述
我在从德国现金卡(也称为Geldkarte)中读取 IBAN 号时遇到了一些问题. 我可以与我的卡通信,并且可以从中获得一些信息.但是我不知道我必须发送哪个命令Apdu才能获得IBAN号码...
i have some issues with reading the IBAN number from the german CashCards (also known as Geldkarte). I can communicate with my card, and i get some informations from it. but i don`t know which commandApdu i must send to the card, to get the IBAN number...
该应用程序在Java 7上运行,我使用java.smartcardio api
Protocoll为T = 1
The application runs on Java 7 and i use the java.smartcardio api
Protocoll is T=1
我的commandApdu获取日期如下:
my commandApdu to get the date looks like this:
byte[] commandBytes = new byte[]{0x00, (byte)0xa4, 0x04, 0x00, 0x07, (byte)0xa0, 0x00, 0x00, 0x00,0x04, 0x30, 0x60, 0x00};
我得到的信息是:
6F 32 84 07 A0 00 00 00 04 30 60 A5 27 50 07 4D 61 65 73 74 72 6F 87 01 03 9F 38 09 9F 33 02 9F 35 01 9F 40 01 5F 2D 04 64 65 65 6E BF 0C 05 9F 4D 02 19 0A
有人可以告诉我获取IBAN号码的正确apdu吗?
Can anyone tell me the correct apdu for getting the IBAN number?
对不起,如果我忘记了一些必要的信息,但这是我在本委员会中的第一个问题:-)
i am sorry if i forgott some information needed, but this is my first question in this board :-)
推荐答案
长时间解决了我的问题: 首先,向卡片发送命令,以选择辅助工具(应用程序标识符):
i solved my problem after a long time this way: At first send a command to the card, to select the aid (application identifier):
private static byte[] aidWithPossibleIban = new byte[] { 0x00, (byte) 0xa4,
0x04, 0x00, 0x09, (byte) 0xa0, 0x00, 0x00, 0x00, 0x59, 0x45, 0x43,
0x01, 0x00, 0x00 };
然后我想提高安全级别:
then i hat to raise the security-level:
private static byte[] cmdRaiseSecurityLevel = new byte[] { 0x00, 0x22,
(byte) 0xf3, 0x02 };
最后要做的就是读取记录:
last thing to do was to read the record:
private static byte[] readSelectedRecord = new byte[] { 0x00, (byte) 0xb2,
0x01, (byte) 0xa4, 0x00 };
致谢 安德烈亚斯(Andreas)
regards Andreas
这篇关于从Emv卡获取IBAN号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!