Skip to content

src/dazzle_back/runtime/totp.py

Generated: 2026-03-30T04:38:48.608228+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

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

Pure-Python implementation using HMAC-SHA1 — no external dependencies.

Key Exports

  • generate_totp_secret
  • get_totp_uri
  • generate_totp
  • verify_totp

Dependencies

Imports

  • base64
  • hashlib
  • hmac
  • secrets
  • struct
  • time
  • urllib.parse

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_totp.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.