From 67907e4e5c2b3347a37e9488549216f71e1a57b2 Mon Sep 17 00:00:00 2001 From: Matheus Afonso Martins Moreira Date: Tue, 20 Feb 2024 23:10:13 -0300 Subject: faces/totp: define TOTP data structure Aggregates all the data necessary for TOTP generation. --- movement/watch_faces/complication/totp_face.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/movement/watch_faces/complication/totp_face.c b/movement/watch_faces/complication/totp_face.c index 242820d7..d634baa3 100644 --- a/movement/watch_faces/complication/totp_face.c +++ b/movement/watch_faces/complication/totp_face.c @@ -29,6 +29,14 @@ #include "watch_utility.h" #include "TOTP.h" +typedef struct { + unsigned char labels[2]; + hmac_alg algorithm; + uint32_t period; + size_t key_length; + uint8_t *key; +} totp_t; + //////////////////////////////////////////////////////////////////////////////// // Enter your TOTP key data below static const uint8_t num_keys = 2; -- cgit v1.2.3