jchambers / java-otp

A one-time password (HOTP/TOTP) library for Java
MIT License
455 stars 122 forks source link

Generate one-time passwords as strings #17

Closed jchambers closed 3 years ago

jchambers commented 4 years ago

This pull request allows java-otp to generate one-time passwords as pre-formatted strings in addition to integers.

I've been hesitant to make this change for fear of starting down a slippery slope into prescribing how users manage security, but I think I'm convinced now that it's not over the line and that converting integers to strings is confusing to enough users that it's worth doing.