mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
MRTD add helper functions:
- Check digit - KMRZ
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user