wstrange / GoogleAuth

Google Authenticator Server side code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to fix the length of the TOTP ?

AjayPara opened this issue · comments

I am just trying this library for generating random TOTP of 6 digits by setting the code digits property but sometimes I am getting the 4/5 digit TOTP.

Can somebody help out how to fix the length of the TOTP?

I can’t remember but I think it returned a number right? If so you need to pad and preappend zeros.

Thanks.it works.