diff --git a/src/keepass2android/Totp/Totp_Client.cs b/src/keepass2android/Totp/Totp_Client.cs index 27cdd07f..9ac5d8cc 100644 --- a/src/keepass2android/Totp/Totp_Client.cs +++ b/src/keepass2android/Totp/Totp_Client.cs @@ -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. } }