]> git.earman.xyz Git - sensor-watch.git/commitdiff
faces/totp: rename initializer macro to credential
authorMatheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Mon, 26 Feb 2024 01:46:45 +0000 (22:46 -0300)
committerMatheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Mon, 26 Feb 2024 01:53:15 +0000 (22:53 -0300)
Shorter and far more expressive.

movement/watch_faces/complication/totp_face.c

index 2edabd83ccd6bff68bd5d9f06357fccfde1ca229..ac73c55e28daa2b7070cd7271aba8ad50d76d41b 100644 (file)
@@ -46,7 +46,7 @@ typedef struct {
     unsigned char *key;
 } totp_t;
 
-#define TOTP_INITIALIZER(label, key_array, algo, timestep) \
+#define CREDENTIAL(label, key_array, algo, timestep) \
     (const totp_t) { \
         .key = ((unsigned char *) key_array), \
         .key_length = sizeof(key_array) - 1, \
@@ -59,8 +59,8 @@ typedef struct {
 // Enter your TOTP key data below
 
 static totp_t credentials[] = {
-    TOTP_INITIALIZER(2F, "JBSWY3DPEHPK3PXP", SHA1, 30),
-    TOTP_INITIALIZER(AC, "JBSWY3DPEHPK3PXP", SHA1, 30),
+    CREDENTIAL(2F, "JBSWY3DPEHPK3PXP", SHA1, 30),
+    CREDENTIAL(AC, "JBSWY3DPEHPK3PXP", SHA1, 30),
 };
 
 // END OF KEY DATA.