MRTD add helper functions:

- Check digit
- KMRZ
This commit is contained in:
Chris van Marle
2022-10-11 22:13:02 +02:00
parent 08afd7c883
commit 0871d274eb
5 changed files with 169 additions and 25 deletions

View File

@@ -2,6 +2,8 @@
#include <furi_hal_nfc.h>
#include "mrtd_helpers.h"
typedef struct {
FuriHalNfcTxRxContext* tx_rx;
uint16_t file_offset;
@@ -11,31 +13,6 @@ typedef struct {
uint64_t ssc_long;
} MrtdApplication;
typedef struct {
uint8_t year;
uint8_t month;
uint8_t day;
} MrtdDate;
// NULL terminated document ID
#define MRTD_DOCNR_MAX_LENGTH 21
typedef enum {
MrtdAuthMethodBac,
MrtdAuthMethodPace,
} MrtdAuthMethod;
typedef struct {
MrtdAuthMethod method;
// BAC input fields
MrtdDate birth_date;
MrtdDate expiry_date;
char doc_number[MRTD_DOCNR_MAX_LENGTH];
//TODO: PACE
} MrtdAuthData;
typedef struct {
MrtdAuthData auth;
} MrtdData;