Skip to content

TOTP not match If we pass totpSize = 6 and step = 60 #65

@kalpesh2804

Description

@kalpesh2804

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, "myemail@yahoo.com", "Test Not Working", digits: 6, period: 60).ToString();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions