Allow to pass secrets to totp_face through a separate (ignored) header.

That header (`totp_face.secrets.h`) is listed in the .gitignore file for that directory, so that there is limited risk to commit it to GitHub by mistake (at least less than when the secrets are directly listed in `totp_face.c`). And this is also easier to use than totp_lfs_face (at least until secrets can be sent to that face over IR).
This commit is contained in:
Mathias Kende
2025-08-29 22:05:13 +02:00
parent 5ecc3d6384
commit ed7761cca4
3 changed files with 9 additions and 0 deletions
+4
View File
@@ -64,10 +64,14 @@ typedef struct {
////////////////////////////////////////////////////////////////////////////////
// Enter your TOTP key data below
#if __has_include("totp_face.secrets.h")
#include "totp_face.secrets.h"
#else
static totp_t credentials[] = {
CREDENTIAL(2F, "JBSWY3DPEHPK3PXP", SHA1, 30),
CREDENTIAL(AC, "JBSWY3DPEHPK3PXP", SHA1, 30),
};
#endif
// END OF KEY DATA.
////////////////////////////////////////////////////////////////////////////////