application interchange profile parse added

This commit is contained in:
Methodius
2024-02-12 16:35:56 +09:00
parent 14d3510d8e
commit b904555ebf
6 changed files with 43 additions and 1 deletions

View File

@@ -82,7 +82,6 @@ bool emv_load(EmvData* data, FlipperFormat* ff, uint32_t version) {
flipper_format_read_string(ff, "Application name", temp_str);
strcpy(app->application_name, furi_string_get_cstr(temp_str));
//Read label
flipper_format_read_string(ff, "Application label", temp_str);
strcpy(app->application_label, furi_string_get_cstr(temp_str));
@@ -98,6 +97,10 @@ bool emv_load(EmvData* data, FlipperFormat* ff, uint32_t version) {
if(!flipper_format_read_hex(ff, "AID", app->aid, aid_len)) break;
if(!flipper_format_read_hex(
ff, "Application interchange profile", app->application_interchange_profile, 2))
break;
if(!flipper_format_read_hex(ff, "Country code", (uint8_t*)&app->country_code, 2)) break;
if(!flipper_format_read_hex(ff, "Currency code", (uint8_t*)&app->currency_code, 2)) break;
@@ -151,6 +154,10 @@ bool emv_save(const EmvData* data, FlipperFormat* ff) {
if(!flipper_format_write_hex(ff, "AID", app.aid, aid_len)) break;
if(!flipper_format_write_hex(
ff, "Application interchange profile", app.application_interchange_profile, 2))
break;
if(!flipper_format_write_hex(ff, "Country code", (uint8_t*)&app.country_code, 2)) break;
if(!flipper_format_write_hex(ff, "Currency code", (uint8_t*)&app.currency_code, 2)) break;