mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-28 20:12:21 -05:00
fixed a bug in TOTP calculation.
see https://keepass2android.codeplex.com/workitem/279 (if Math.pow(10,6) returns 999 999.99999 this was converted to 999 999 in the previous version)
This commit is contained in:
parent
3c5c9105b7
commit
6604ae292b
@ -114,7 +114,7 @@ namespace OtpProviderClient
|
||||
| ((hash[offset + 2] & 0xff) << 8) //Math.
|
||||
| (hash[offset + 3] & 0xff); //Math.
|
||||
|
||||
int password = binary % (int)Math.Pow(10, _Length); //Math.
|
||||
int password = binary % Convert.ToInt32(Math.Pow(10, _Length)); //Math.
|
||||
return password.ToString(new string('0', _Length)); //Math.
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user