Properly implement Key loading

This commit is contained in:
Steven Tracey 2024-11-22 10:36:27 -05:00
parent 28e9124c09
commit d7cc8d67e6
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@ int computeWidth(char* text, sFONT *font) {
return (font->Width) * strlen(text); return (font->Width) * strlen(text);
} }
//TODO Put display to sleep after
void code(UWORD *blackImage, char* confName) { void code(UWORD *blackImage, char* confName) {
int ch; int ch;
codeLoop: codeLoop:

View File

@ -113,13 +113,16 @@ func loadConfigs() {
} }
config := otp.Config{ config := otp.Config{
Key: key,
Hash: hashVar, Hash: hashVar,
TimeStep: timeStep, TimeStep: timeStep,
Counter: counter, Counter: counter,
Digits: digits, Digits: digits,
Format: format, Format: format,
} }
err = config.ParseKey(key)
if err != nil {
panic(err)
}
fileName := fileEntry.Name() fileName := fileEntry.Name()
ext := filepath.Ext(fileName) ext := filepath.Ext(fileName)