This library is for generating Time-based One-time Password (TOTP) codes/tokens, which is defined in RFC 6238.
Features of this crate:
- Both low-level and high-level APIs are provided.
- The length of the codes, the initial counter time (T0), update time interval (period) and hash algorithm are configurable.
- HMAC algorithms are implemented by ring.
- Read or write “Key Uri Format”
(URIs start with
- Read or write
keyfrom base32-encoded string (the
Note: This implementation does NOT consider the time earlier than the
Unix epoch (
high_level::TotpGenerator for an example.
Features that may be related to but not implemented in this crate:
- Read or write QR codes.
High-level APIs for TOTP code generation.
Low-level APIs for TOTP code generation.
Read or write URIs start with