Properly implement Key loading

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

View File

@@ -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)