Merge pull request #376 from qistoph/mrtd

MRTD Support NFC-B documents
This commit is contained in:
RogueMaster
2022-10-24 02:43:25 -04:00
committed by GitHub
2 changed files with 52 additions and 6 deletions

View File

@@ -21,8 +21,20 @@ void nfc_scene_passport_read_on_enter(void* context) {
temp_str = furi_string_alloc();
furi_string_set(temp_str, "\e#Passport\n");
char iso_type = FURI_BIT(data->sak, 5) ? '4' : '3';
//TODO: NFC-B?
furi_string_cat_printf(temp_str, "ISO 14443-%c (NFC-A)\n", iso_type);
char nfc_type;
switch(data->type) {
case FuriHalNfcTypeA:
nfc_type = 'A';
break;
case FuriHalNfcTypeB:
nfc_type = 'B';
break;
default:
nfc_type = '?';
break;
}
furi_string_cat_printf(temp_str, "ISO 14443-%c (NFC-%c)\n", iso_type, nfc_type);
furi_string_cat_printf(temp_str, "UID:");
for(size_t i = 0; i < data->uid_len; i++) {
furi_string_cat_printf(temp_str, " %02X", data->uid[i]);
@@ -70,4 +82,4 @@ void nfc_scene_passport_read_on_exit(void* context) {
// Clear view
widget_reset(nfc->widget);
}
}