support SHA256 and SHA512 hash algorithm for otpauth:// TOTPs, closes https://github.com/PhilippC/keepass2android/issues/1155
This commit is contained in:
@@ -31,6 +31,11 @@ namespace keepass2android
|
||||
res.Length = parsedQuery.Get("digits");
|
||||
res.Duration = parsedQuery.Get("period");
|
||||
res.Encoder = parsedQuery.Get("encoder");
|
||||
string algo = parsedQuery.Get("algorithm");
|
||||
if (algo == "SHA512")
|
||||
res.HashAlgorithm = "HMAC-SHA-512";
|
||||
if (algo == "SHA256")
|
||||
res.HashAlgorithm = "HMAC-SHA-256";
|
||||
|
||||
|
||||
//set defaults according to https://github.com/google/google-authenticator/wiki/Key-Uri-Format
|
||||
|
||||
Reference in New Issue
Block a user