Otp.NET
Otp.NET copied to clipboard
TOTP not match If we pass totpSize = 6 and step = 60
This code result match with Google Authenticator
var base32Bytes = Base32Encoding.ToBytes(key);
var totp = new Totp(base32Bytes);
var totpCode = totp.ComputeTotp();
This code result not match with Google Authenticator
var base32Bytes = Base32Encoding.ToBytes(key);
var totp = new Totp(base32Bytes, totpSize: 6, step: 60);
var totpCode = totp.ComputeTotp();
Google Authenticator URI example
var uriString = new OtpUri(OtpType.Totp, key, "[email protected]", "Test Not Working", digits: 6, period: 60).ToString();