Merge pull request #107 from mkende/safe_totp
Allow to pass secrets to totp_face through a separate (ignored) header.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
totp_face.secrets.h
|
||||
@@ -63,10 +63,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(AAC, "JBSWY3DPEHPK3PXP", SHA1, 30),
|
||||
};
|
||||
#endif
|
||||
|
||||
// END OF KEY DATA.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -62,6 +62,10 @@
|
||||
* o `algorithm` is one of the supported hashing algorithms listed above.
|
||||
* o `timestep` is how often the TOTP refreshes in seconds. This is usually
|
||||
* 30 seconds.
|
||||
* o Alternatively, place the `credentials` variable as-is in a file named
|
||||
* `totp_face.secrets.h` in this directory, and it will be included instead.
|
||||
* This lowers the risk of commiting your OTP secrets to GitHub as that file
|
||||
* is listed in the .gitignore file.
|
||||
*
|
||||
* If you have more than one secret key, press ALARM to cycle through them.
|
||||
* Press LIGHT to cycle in the other direction or keep it pressed longer to
|
||||
|
||||
Reference in New Issue
Block a user