-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leading zeroes #4
Comments
By the way, I can do a PR for this too if you want. |
Definitely a good idea, I can take care of this. I'll probably make an |
Yeah, that's exactly what I was thinking.
Yeah, what I suggested is adding a field that tells "next refresh in 12 seconds" for example, not duplicating the duration. That could be useful to apps to know when to refresh next. |
Ah okay, that makes sense. Though I was thinking of making the What may make more sense is adding in a |
Yeah I see, makes sense to have the same result for both OTP types and put the Looking forward to this when I fix my problems with Android export on my project. |
Both features are added as of v0.4.0 |
I use the crate for a keepass TOTP app and I have a little issue with leading zeroes.
When you have the result of the
get_otp
, you don't really know how to format the string to have the correct number of leading 0.I suggest that
get_otp
returns a struct that contains the otp, the number of digits and the duration before next refresh and has methods likeget_as_integer
andget_as_string
in particular that return a string with the correct number of leading zeroes.The text was updated successfully, but these errors were encountered: