]> git.earman.xyz Git - sensor-watch.git/commitdiff
faces/totp: define TOTP data structure
authorMatheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Wed, 21 Feb 2024 02:10:13 +0000 (23:10 -0300)
committerMatheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Wed, 21 Feb 2024 02:10:13 +0000 (23:10 -0300)
Aggregates all the data necessary for TOTP generation.

movement/watch_faces/complication/totp_face.c

index 242820d79a07dcc6420b34c326fac87d17174231..d634baa30de3966ed8ff46a15ce5f3366d5b176c 100644 (file)
 #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;