Breaking
This is a BIG API change. Please check MIGRATION.md for more details.
What's new
- MSRV was bumped to 1.88.
- Edition was bumped to
2024. [no_std]support with #87 and #88.- We now use the builder pattern to instanciate a
Totpstruct. - Error types were unified into one Error type.
Changes
- Types and methods were renamed to more idiomatic alternatives.
- Functions that check the validity of a token now return the matched step to give user more tools to prevent token reuse. #63 ans #75.
Secretserializes to an unpadded base32 string in human-readable formats (JSON, TOML, ...) and to a raw byte string in binary formats. Deserialization accepts both, plus integer sequences from formats without a native byte type.Totpnow implementsPartialEqandEq, usingSecret's constant-time comparison for the secret field.
Special thanks
- @bushrat011899 For huge work on #87, #88.
- @Amandeepsinghghai and @sidrubs For pointing out something should be done about to avoid token reuse.