Skip to main content

Module otp

Module otp 

Source
Expand description

TOTP (Time-based One-Time Password) implementation per RFC 6238.

Used for OTP gating of sensitive actions, domains, and estop resume.

Structs§

OtpGate
OTP gating engine — checks whether an action or domain requires OTP.

Enums§

OtpGateResult
Decision from the OTP gate.

Functions§

generate_totp
Generate a TOTP code for the given secret and time step.
generate_totp_at
Generate a TOTP code for a specific unix timestamp (for testing).
validate_totp
Validate a TOTP code with a time window for clock skew tolerance.
validate_totp_at
Validate a TOTP code at a specific timestamp (for testing).