Crate totp_rfc6238[][src]

This library is for generating 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 otpauth://totp/) (the oathuri feature gate).
  • Read or write key from base32-encoded string (the oathuri feature gate).

See high_level::TotpGenerator for an example.


Features that may be related to but not implemented in this crate:

  • Read or write QR codes.

Re-exports

pub use high_level::TotpGenerator;
pub use low_level::HashAlgorithm;

Modules

high_level

High-level APIs for TOTP code generation.

low_level

Low-level APIs for TOTP code generation.

oath_uri

Read or write URIs start with otpauth://totp/.