implement defaults for otpauth:// style otp entries

This commit is contained in:
Philipp Crocoll
2018-06-06 06:02:48 +02:00
parent f3022a19c2
commit 2bc12c510b

View File

@@ -30,6 +30,11 @@ namespace keepass2android
res.TotpSeed = parsedQuery.Get("secret");
res.Length = parsedQuery.Get("digits");
res.Duration = parsedQuery.Get("period");
//set defaults according to https://github.com/google/google-authenticator/wiki/Key-Uri-Format
if (res.Length == null)
res.Length = "6";
if (res.Duration == null)
res.Duration = "30";
}
catch (Exception)
{