gotp
gotp copied to clipboard
Provide a method for checking if secret is valid to avoid panic checking
Calls time Now() and At() can panic if the secret is invalid, but there's no safe way using this library to check if the secret is valid without handling the panic.
Providing a non-panic method for checking this would be ideal (IsValid() or something which could return the err from byteSecret() instead of panicing).
Most APIs should not panic and should just push errors up the stack instead.
good point @djherbis, if anybody has time to implement it and send PR, I will review this.
Closing this issue, implemented in #24