v3.0.0
New features
- Secret handling is now less error prone thanks to #25
- Totp now implements the
Defaulttrait, which will generate a strong secret, and have sane default values according to RFC-6238 like #26 Rfc6238struct is exposed for easy Totp buildingTotp.ttlconvenience method will tell remaining validity time of token (not taking skew into account)
New dependency
- [gen_secret] uses
randto generate a secret
Breaking
- TotpUrlError now contain a string explaining. Inspired by #23
- Totp fields
issuerandaccount_namewon't be present anymore if featureotpauthisn't enabled - The secret and digits field will now be validated for SecretSize (>= 128 bits)
Special thanks
- @sacovofor opening #23, from which the TotpUrlError rework was inspired
- @steven89 for the tremendous work and back and forth provided with #24 #25 and #26
Note
This has been, I think, the update containing the most work. While a lot of unit testing have been done, and test cases added, coverage seems to have dropped. Please report any issue encountered while updating totp-rs to 3.0.0