Mifare аутентификация
Скажем, я хочу пройти аутентификацию в Mifare Classic.
Как узнать точный тип APDU для отправки на карту?
Пример.
Этот код:
bcla = 0xFF;
bins = 0x86;
bp1 = 0x0;
bp2 = 0x0; // currentBlock
len = 0x5;
sendBuffer[0] = bcla;
sendBuffer[1] = bins;
sendBuffer[2] = bp1;
sendBuffer[3] = bp2;
sendBuffer[4] = len;
sendBuffer[5] = 0x1; // Version
sendBuffer[6] = 0x0; // Address MSB
sendBuffer[7] = currentBlock;
if(keyradioButton->Checked==true) // Address LSB
sendBuffer[8] = 0x60; // Key Type A
else if(keynumberradioButton->Checked ==true)
sendBuffer[8] = 0x61; // Key Type B
sendBuffer[9] = keynumber; // Key Number
sendbufferlen = 0xA;
receivebufferlen = 255;
//Invoke the Transmit command
retval = SCardTransmit(hCard, // A reference value returned from the SCardConnect function.
&sioreq,
sendBuffer, // Send buffer
sendbufferlen, // Send buffer length
&rioreq,
receiveBuffer, // Receive butter
&receivebufferlen); // Length of received buffer
пример программы, которая пытается пройти аутентификацию в Mifare Classic Мой вопрос в основном, как я узнаю, какой тип APDU отправить на карту? например, как я узнаю, что должно быть в?sendBuffer