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:
@@ -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.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user