From d7cc8d67e6470de3a47d709c86642b925122aac4 Mon Sep 17 00:00:00 2001 From: Steven Tracey Date: Fri, 22 Nov 2024 10:36:27 -0500 Subject: [PATCH] Properly implement Key loading --- c/src/p2fa.c | 1 + go/totp.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/c/src/p2fa.c b/c/src/p2fa.c index d3752ee..28422db 100644 --- a/c/src/p2fa.c +++ b/c/src/p2fa.c @@ -37,6 +37,7 @@ int computeWidth(char* text, sFONT *font) { return (font->Width) * strlen(text); } +//TODO Put display to sleep after void code(UWORD *blackImage, char* confName) { int ch; codeLoop: diff --git a/go/totp.go b/go/totp.go index 3227f5c..372bf64 100644 --- a/go/totp.go +++ b/go/totp.go @@ -113,13 +113,16 @@ func loadConfigs() { } config := otp.Config{ - Key: key, Hash: hashVar, TimeStep: timeStep, Counter: counter, Digits: digits, Format: format, } + err = config.ParseKey(key) + if err != nil { + panic(err) + } fileName := fileEntry.Name() ext := filepath.Ext(fileName)