Crate otp2

Source
Expand description

HMAC-based one-time passcodes

Provides implementations for both IETF RFCs:

  • 4226: simple incrementing counter (HOTP)
  • 6238: time-based counter (TOTP)

Custom HMAC-based one-time passcodes can be provided by types implementing the ToBytes trait.

Structs§

Otp
One-time passcodes.

Enums§

HotpError

Traits§

ToBytes
Trait used to provide bytes as input to the HMAC algorithm.

Type Aliases§

Hotp
HMAC-based one-time passcode
OtpResult
Totp
Time-based one-time passcode.