# @suaveplan/otp - RFC 4226 (HOTP) + RFC 6238 (TOTP) + RFC 6287 (OCRA) + Google Authenticator Key URI Format + Base32 (RFC 4648 §6) + recovery codes + clock-drift detector — zero browser/Node deps ## Summary > **RFC 4226 (HOTP) + RFC 6238 (TOTP) + RFC 6287 (OCRA) + Google Authenticator Key URI Format + Base32 (RFC 4648 §6) + recovery codes + clock-drift detector** — zero browser/Node deps. ## Documentation tree - [base32](./src/base32/base32.md) — _(no submodules)_ - [base32](./src/base32/base32.md) — _(no submodules)_ - [drift](./src/drift/detect.md) — _(no submodules)_ - [detect](./src/drift/detect.md) — _(no submodules)_ - [codes](./src/errors/codes.md) — Stable, registered error codes for `@suaveplan/otp` plus the typed `OtpError` base class. Every failure that crosses th… - [zod-map](./src/errors/zod-map.md) — Translate Zod boundary failures into the most-specific `OtpErrorCode`. When a caller passes options that fail strict-mo… - [hotp](./src/hotp/hotp.md) — _(no submodules)_ - hotp.schema — Zod boundary schema for `HotpOptions`… - [encode-counter](./src/hotp/encode-counter.md) — Encode an HOTP counter as the 8-byte big-endian block required by RFC 4226 §5.1. `bigint` is the canonical input type b… - [hmac](./src/hotp/hmac.md) — Algorithm-routing HMAC façade for the OTP family. SHA-256 and SHA-512 route through `@suaveplan/crypto-hash` (the canon… - [hotp](./src/hotp/hotp.md) — _(no submodules)_ - hotp.schema — Zod boundary schema for `HotpOptions`… - [hotp.schema](./src/hotp/hotp.schema.md) — Zod boundary schema for `HotpOptions`. Strict-mode parsing rejects unknown keys (so silent typos in caller configuratio… - [observability](./src/observability/metrics.md) — _(no submodules)_ - [metrics](./src/observability/metrics.md) — _(no submodules)_ - [ocra](./src/ocra/ocra.md) — _(no submodules)_ - ocra.schema — Zod boundary schema for `OcraParams`…… - [encode-challenge](./src/ocra/encode-challenge.md) — Encode the OCRA challenge into the 128-byte block required by RFC 6287 §5.1. Three challenge formats are supported: `QN… - [mutual-auth](./src/ocra/mutual-auth.md) — RFC 6287 §7.1 mutual authentication helpers. Both sides compute OCRA over the concatenation of the client and server ch… - [ocra](./src/ocra/ocra.md) — _(no submodules)_ - ocra.schema — Zod boundary schema for `OcraParams`…… - [ocra.schema](./src/ocra/ocra.schema.md) — Zod boundary schema for `OcraParams` — the runtime parameter bag passed alongside a suite string and a key. Optional fi… - [suite](./src/ocra/suite.md) — Parse an OCRA suite string into a typed `OcraSuite` AST per RFC 6287 §6.1. Exposed separately so callers can validate s… - [verify-ocra](./src/ocra/verify-ocra.md) — Constant-time verify of an OCRA response. Recomputes the response under the supplied suite, key, and params, then compa… - [generate](./src/recovery/generate.md) — Generate Crockford-base32 recovery codes — the printable single-use fallback the user prints / writes down when first e… - [hash](./src/recovery/hash.md) — Hash recovery codes with Argon2id for at-rest storage. Recovery codes are long-lived shared secrets — they must NOT be… - [verify](./src/recovery/verify.md) — Verify a user-supplied recovery code against a list of stored hashes. Constant-time over the full set — every entry is… - [totp](./src/totp/totp.md) — _(no submodules)_ - totp.schema — Zod boundary schemas for `TotpOptions… - [totp](./src/totp/totp.md) — _(no submodules)_ - totp.schema — Zod boundary schemas for `TotpOptions… - [totp.schema](./src/totp/totp.schema.md) — Zod boundary schemas for `TotpOptions` and `TotpVerifyOptions`. The TOTP schema covers algorithm / digits / period / t0… - [verify-many](./src/totp/verify-many.md) — Backup-aware TOTP verify. Used during rotation windows where an old and a new TOTP secret coexist — the user's authenti… - [verify](./src/totp/verify.md) — RFC 6238 §5.2 verify with drift window. Checks the supplied code against the current step and `±window` neighbouring st… - [format-uri](./src/uri/format-uri.md) — Build a canonical `otpauth://` URI from an `OtpUri` value object. Round-trips with `parseUri` for every valid input. Pe… - [parse-uri](./src/uri/parse-uri.md) — Parse the `otpauth://` Key URI Format used by Google Authenticator and every compatible authenticator app. Supports bot… - [uri.schema](./src/uri/uri.schema.md) — Zod boundary schemas for the `OtpUri` discriminated union. `OtpTotpUriSchema` and `OtpHotpUriSchema` cover the per-vari… - [base32](./src/base32/base32.md) — _(no submodules)_- [drift](./src/drift/detect.md) — _(no submodules)_- [detect](./src/drift/detect.md) — _(no submodules)_- [codes](./src/errors/codes.md) — Stable, registered error codes for `@suaveplan/otp` plus the typed `OtpError` base class. Every failure that crosses th… - [zod-map](./src/errors/zod-map.md) — Translate Zod boundary failures into the most-specific `OtpErrorCode`. When a caller passes options that fail strict-mo… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [encode-counter](./src/hotp/encode-counter.md) — Encode an HOTP counter as the 8-byte big-endian block required by RFC 4226 §5.1. `bigint` is the canonical input type b… - [hmac](./src/hotp/hmac.md) — Algorithm-routing HMAC façade for the OTP family. SHA-256 and SHA-512 route through `@suaveplan/crypto-hash` (the canon… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [hotp.schema](./src/hotp/hotp.schema.md) — Zod boundary schema for `HotpOptions`. Strict-mode parsing rejects unknown keys (so silent typos in caller configuratio… - [observability](./src/observability/metrics.md) — _(no submodules)_- [metrics](./src/observability/metrics.md) — _(no submodules)_- [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`…… - [encode-challenge](./src/ocra/encode-challenge.md) — Encode the OCRA challenge into the 128-byte block required by RFC 6287 §5.1. Three challenge formats are supported: `QN… - [mutual-auth](./src/ocra/mutual-auth.md) — RFC 6287 §7.1 mutual authentication helpers. Both sides compute OCRA over the concatenation of the client and server ch… - [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`…… - [ocra.schema](./src/ocra/ocra.schema.md) — Zod boundary schema for `OcraParams` — the runtime parameter bag passed alongside a suite string and a key. Optional fi… - [suite](./src/ocra/suite.md) — Parse an OCRA suite string into a typed `OcraSuite` AST per RFC 6287 §6.1. Exposed separately so callers can validate s… - [verify-ocra](./src/ocra/verify-ocra.md) — Constant-time verify of an OCRA response. Recomputes the response under the supplied suite, key, and params, then compa… - [generate](./src/recovery/generate.md) — Generate Crockford-base32 recovery codes — the printable single-use fallback the user prints / writes down when first e… - [hash](./src/recovery/hash.md) — Hash recovery codes with Argon2id for at-rest storage. Recovery codes are long-lived shared secrets — they must NOT be… - [verify](./src/recovery/verify.md) — Verify a user-supplied recovery code against a list of stored hashes. Constant-time over the full set — every entry is… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp.schema](./src/totp/totp.schema.md) — Zod boundary schemas for `TotpOptions` and `TotpVerifyOptions`. The TOTP schema covers algorithm / digits / period / t0… - [verify-many](./src/totp/verify-many.md) — Backup-aware TOTP verify. Used during rotation windows where an old and a new TOTP secret coexist — the user's authenti… - [verify](./src/totp/verify.md) — RFC 6238 §5.2 verify with drift window. Checks the supplied code against the current step and `±window` neighbouring st… - [format-uri](./src/uri/format-uri.md) — Build a canonical `otpauth://` URI from an `OtpUri` value object. Round-trips with `parseUri` for every valid input. Pe… - [parse-uri](./src/uri/parse-uri.md) — Parse the `otpauth://` Key URI Format used by Google Authenticator and every compatible authenticator app. Supports bot… - [uri.schema](./src/uri/uri.schema.md) — Zod boundary schemas for the `OtpUri` discriminated union. `OtpTotpUriSchema` and `OtpHotpUriSchema` cover the per-vari… - [base32](./src/base32/base32.md) — _(no submodules)_- [drift](./src/drift/detect.md) — _(no submodules)_- [detect](./src/drift/detect.md) — _(no submodules)_- [codes](./src/errors/codes.md) — Stable, registered error codes for `@suaveplan/otp` plus the typed `OtpError` base class. Every failure that crosses th… - [zod-map](./src/errors/zod-map.md) — Translate Zod boundary failures into the most-specific `OtpErrorCode`. When a caller passes options that fail strict-mo… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [encode-counter](./src/hotp/encode-counter.md) — Encode an HOTP counter as the 8-byte big-endian block required by RFC 4226 §5.1. `bigint` is the canonical input type b… - [hmac](./src/hotp/hmac.md) — Algorithm-routing HMAC façade for the OTP family. SHA-256 and SHA-512 route through `@suaveplan/crypto-hash` (the canon… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [hotp.schema](./src/hotp/hotp.schema.md) — Zod boundary schema for `HotpOptions`. Strict-mode parsing rejects unknown keys (so silent typos in caller configuratio… - [observability](./src/observability/metrics.md) — _(no submodules)_- [metrics](./src/observability/metrics.md) — _(no submodules)_- [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`…… - [encode-challenge](./src/ocra/encode-challenge.md) — Encode the OCRA challenge into the 128-byte block required by RFC 6287 §5.1. Three challenge formats are supported: `QN… - [mutual-auth](./src/ocra/mutual-auth.md) — RFC 6287 §7.1 mutual authentication helpers. Both sides compute OCRA over the concatenation of the client and server ch… - [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`…… - [ocra.schema](./src/ocra/ocra.schema.md) — Zod boundary schema for `OcraParams` — the runtime parameter bag passed alongside a suite string and a key. Optional fi… - [suite](./src/ocra/suite.md) — Parse an OCRA suite string into a typed `OcraSuite` AST per RFC 6287 §6.1. Exposed separately so callers can validate s… - [verify-ocra](./src/ocra/verify-ocra.md) — Constant-time verify of an OCRA response. Recomputes the response under the supplied suite, key, and params, then compa… - [generate](./src/recovery/generate.md) — Generate Crockford-base32 recovery codes — the printable single-use fallback the user prints / writes down when first e… - [hash](./src/recovery/hash.md) — Hash recovery codes with Argon2id for at-rest storage. Recovery codes are long-lived shared secrets — they must NOT be… - [verify](./src/recovery/verify.md) — Verify a user-supplied recovery code against a list of stored hashes. Constant-time over the full set — every entry is… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp.schema](./src/totp/totp.schema.md) — Zod boundary schemas for `TotpOptions` and `TotpVerifyOptions`. The TOTP schema covers algorithm / digits / period / t0… - [verify-many](./src/totp/verify-many.md) — Backup-aware TOTP verify. Used during rotation windows where an old and a new TOTP secret coexist — the user's authenti… - [verify](./src/totp/verify.md) — RFC 6238 §5.2 verify with drift window. Checks the supplied code against the current step and `±window` neighbouring st… - [format-uri](./src/uri/format-uri.md) — Build a canonical `otpauth://` URI from an `OtpUri` value object. Round-trips with `parseUri` for every valid input. Pe… - [parse-uri](./src/uri/parse-uri.md) — Parse the `otpauth://` Key URI Format used by Google Authenticator and every compatible authenticator app. Supports bot… - [uri.schema](./src/uri/uri.schema.md) — Zod boundary schemas for the `OtpUri` discriminated union. `OtpTotpUriSchema` and `OtpHotpUriSchema` cover the per-vari… - [base32](./src/base32/base32.md) — _(no submodules)_- [drift](./src/drift/detect.md) — _(no submodules)_- [detect](./src/drift/detect.md) — _(no submodules)_- [codes](./src/errors/codes.md) — Stable, registered error codes for `@suaveplan/otp` plus the typed `OtpError` base class. Every failure that crosses th… - [zod-map](./src/errors/zod-map.md) — Translate Zod boundary failures into the most-specific `OtpErrorCode`. When a caller passes options that fail strict-mo… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [encode-counter](./src/hotp/encode-counter.md) — Encode an HOTP counter as the 8-byte big-endian block required by RFC 4226 §5.1. `bigint` is the canonical input type b… - [hmac](./src/hotp/hmac.md) — Algorithm-routing HMAC façade for the OTP family. SHA-256 and SHA-512 route through `@suaveplan/crypto-hash` (the canon… - [hotp](./src/hotp/hotp.md) — _(no submodules)_- hotp.schema — Zod boundary schema for `HotpOptions`… - [hotp.schema](./src/hotp/hotp.schema.md) — Zod boundary schema for `HotpOptions`. Strict-mode parsing rejects unknown keys (so silent typos in caller configuratio… - [observability](./src/observability/metrics.md) — _(no submodules)_- [metrics](./src/observability/metrics.md) — _(no submodules)_- [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`… - [encode-challenge](./src/ocra/encode-challenge.md) — Encode the OCRA challenge into the 128-byte block required by RFC 6287 §5.1. Three challenge formats are supported: `QN… - [mutual-auth](./src/ocra/mutual-auth.md) — RFC 6287 §7.1 mutual authentication helpers. Both sides compute OCRA over the concatenation of the client and server ch… - [ocra](./src/ocra/ocra.md) — _(no submodules)_- ocra.schema — Zod boundary schema for `OcraParams`… - [ocra.schema](./src/ocra/ocra.schema.md) — Zod boundary schema for `OcraParams` — the runtime parameter bag passed alongside a suite string and a key. Optional fi… - [suite](./src/ocra/suite.md) — Parse an OCRA suite string into a typed `OcraSuite` AST per RFC 6287 §6.1. Exposed separately so callers can validate s… - [verify-ocra](./src/ocra/verify-ocra.md) — Constant-time verify of an OCRA response. Recomputes the response under the supplied suite, key, and params, then compa… - [generate](./src/recovery/generate.md) — Generate Crockford-base32 recovery codes — the printable single-use fallback the user prints / writes down when first e… - [hash](./src/recovery/hash.md) — Hash recovery codes with Argon2id for at-rest storage. Recovery codes are long-lived shared secrets — they must NOT be… - [verify](./src/recovery/verify.md) — Verify a user-supplied recovery code against a list of stored hashes. Constant-time over the full set — every entry is… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp](./src/totp/totp.md) — _(no submodules)_- totp.schema — Zod boundary schemas for `TotpOptions… - [totp.schema](./src/totp/totp.schema.md) — Zod boundary schemas for `TotpOptions` and `TotpVerifyOptions`. The TOTP schema covers algorithm / digits / period / t0… - [verify-many](./src/totp/verify-many.md) — Backup-aware TOTP verify. Used during rotation windows where an old and a new TOTP secret coexist — the user's authenti… - [verify](./src/totp/verify.md) — RFC 6238 §5.2 verify with drift window. Checks the supplied code against the current step and `±window` neighbouring st… - [format-uri](./src/uri/format-uri.md) — Build a canonical `otpauth://` URI from an `OtpUri` value object. Round-trips with `parseUri` for every valid input. Pe… - [parse-uri](./src/uri/parse-uri.md) — Parse the `otpauth://` Key URI Format used by Google Authenticator and every compatible authenticator app. Supports bot… - [uri.schema](./src/uri/uri.schema.md) — Zod boundary schemas for the `OtpUri` discriminated union. `OtpTotpUriSchema` and `OtpHotpUriSchema` cover the per-vari… - [base32](./src/base32/base32.md) — _(no submodules)_- [drift](./src/drift/detect.md) — _(no submodules)_ - [detect](./src/drift/detect.md) — _(no submodules)_- [codes](./src/errors/codes.md) — Stable, registered error codes for `@suaveplan/otp` plus the typed `OtpError` base class. Every failure that crosses th… - [zod-map](./src/errors/zod-map.md) — Translate Zod boundary failures into the most-specific `OtpErrorCode`. When a caller passes options that fail strict-mo… - [hotp](./src/hotp/hotp.md) — _(no submodules)_ - [encode-counter](./src/hotp/encode-counter.md) — Encode an HOTP counter as the 8-byte big-endian block required by RFC 4226 §5.1. `bigint` is the canonical input type b… - [hmac](./src/hotp/hmac.md) — Algorithm-routing HMAC façade for the OTP family. SHA-256 and SHA-512 route through `@suaveplan/crypto-hash` (the canon… - [hotp](./src/hotp/hotp.md) — _(no submodules)_ - [hotp.schema](./src/hotp/hotp.schema.md) — Zod boundary schema for `HotpOptions`. Strict-mode parsing rejects unknown keys (so silent typos in caller configuratio… - [observability](./src/observability/metrics.md) — _(no submodules)_ - [metrics](./src/observability/metrics.md) — _(no submodules)_- [ocra](./src/ocra/ocra.md) — _(no submodules)_ - [encode-challenge](./src/ocra/encode-challenge.md) — Encode the OCRA challenge into the 128-byte block required by RFC 6287 §5.1. Three challenge formats are supported: `QN… - [mutual-auth](./src/ocra/mutual-auth.md) — RFC 6287 §7.1 mutual authentication helpers. Both sides compute OCRA over the concatenation of the client and server ch… - [ocra](./src/ocra/ocra.md) — _(no submodules)_ - [ocra.schema](./src/ocra/ocra.schema.md) — Zod boundary schema for `OcraParams` — the runtime parameter bag passed alongside a suite string and a key. Optional fi… - [suite](./src/ocra/suite.md) — Parse an OCRA suite string into a typed `OcraSuite` AST per RFC 6287 §6.1. Exposed separately so callers can validate s… - [verify-ocra](./src/ocra/verify-ocra.md) — Constant-time verify of an OCRA response. Recomputes the response under the supplied suite, key, and params, then compa… - [generate](./src/recovery/generate.md) — Generate Crockford-base32 recovery codes — the printable single-use fallback the user prints / writes down when first e… - [hash](./src/recovery/hash.md) — Hash recovery codes with Argon2id for at-rest storage. Recovery codes are long-lived shared secrets — they must NOT be… - [verify](./src/recovery/verify.md) — Verify a user-supplied recovery code against a list of stored hashes. Constant-time over the full set — every entry is… - [totp](./src/totp/totp.md) — _(no submodules)_ - [totp](./src/totp/totp.md) — _(no submodules)_ - [totp.schema](./src/totp/totp.schema.md) — Zod boundary schemas for `TotpOptions` and `TotpVerifyOptions`. The TOTP schema covers algorithm / digits / period / t0… - [verify-many](./src/totp/verify-many.md) — Backup-aware TOTP verify. Used during rotation windows where an old and a new TOTP secret coexist — the user's authenti… - [verify](./src/totp/verify.md) — RFC 6238 §5.2 verify with drift window. Checks the supplied code against the current step and `±window` neighbouring st… - [format-uri](./src/uri/format-uri.md) — Build a canonical `otpauth://` URI from an `OtpUri` value object. Round-trips with `parseUri` for every valid input. Pe… - [parse-uri](./src/uri/parse-uri.md) — Parse the `otpauth://` Key URI Format used by Google Authenticator and every compatible authenticator app. Supports bot… - [uri.schema](./src/uri/uri.schema.md) — Zod boundary schemas for the `OtpUri` discriminated union. `OtpTotpUriSchema` and `OtpHotpUriSchema` cover the per-vari… ## Install ```bash bun add @suaveplan/otp ``` ## Subpath exports | Subpath | Surface | |---|---| | `@suaveplan/otp` | HOTP / TOTP / verify / verifyMany / detectDrift / recovery codes | | `@suaveplan/otp/uri` | `parseUri`, `formatUri`, `OtpUri`, `OtpUriSchema` | | `@suaveplan/otp/base32` | `base32Encode`, `base32Decode` | | `@suaveplan/otp/ocra` | `ocra`, `parseOcraSuite`, `verifyOcra`, mutual-auth helpers | | `@suaveplan/otp/errors` | `OTP_CODES`, `OtpError`, `OtpErrorCode` | | `@suaveplan/otp/observability` | OTel instrument factories + recorders | ## Quick start ```ts import { totp, verify } from "@suaveplan/otp"; import { base32Decode } from "@suaveplan/otp/base32"; import { parseUri } from "@suaveplan/otp/uri"; const u = parseUri("otpauth://totp/alice?secret=JBSWY3DPEHPK3PXP&issuer=Example"); const secret = base32Decode(u.secret); const code = totp(secret); const r = verify(code, secret); // r === { valid: true, delta: 0 } ``` ## Modules - [`base32/base32.md`](src/base32/base32.md) — RFC 4648 §6 base32. - [`hotp/hotp.md`](src/hotp/hotp.md) — RFC 4226 HOTP. - [`hotp/encode-counter.md`](src/hotp/encode-counter.md) — 8-byte big-endian. - [`hotp/hmac.md`](src/hotp/hmac.md) — algorithm-routing HMAC. - [`hotp/hotp.schema.md`](src/hotp/hotp.schema.md) — Zod boundary. - [`totp/totp.md`](src/totp/totp.md) — RFC 6238 TOTP. - [`totp/verify.md`](src/totp/verify.md) — drift-windowed verify. - [`totp/verify-many.md`](src/totp/verify-many.md) — backup-aware verify. - [`totp/totp.schema.md`](src/totp/totp.schema.md) — Zod boundary. - [`uri/parse-uri.md`](src/uri/parse-uri.md) — `otpauth://` parser. - [`uri/format-uri.md`](src/uri/format-uri.md) — `otpauth://` builder. - [`uri/uri.schema.md`](src/uri/uri.schema.md) — Zod boundary. - [`ocra/ocra.md`](src/ocra/ocra.md) — RFC 6287 OCRA. - [`ocra/suite.md`](src/ocra/suite.md) — suite-string parser. - [`ocra/encode-challenge.md`](src/ocra/encode-challenge.md) — challenge block. - [`ocra/verify-ocra.md`](src/ocra/verify-ocra.md) — constant-time verify. - [`ocra/mutual-auth.md`](src/ocra/mutual-auth.md) — RFC §7.1 mutual auth. - [`ocra/ocra.schema.md`](src/ocra/ocra.schema.md) — Zod boundary. - [`recovery/generate.md`](src/recovery/generate.md) — Crockford codes. - [`recovery/hash.md`](src/recovery/hash.md) — Argon2id-hashed at-rest form. - [`recovery/verify.md`](src/recovery/verify.md) — constant-time verify. - [`drift/detect.md`](src/drift/detect.md) — clock-drift detector. - [`observability/metrics.md`](src/observability/metrics.md) — OTel. - [`errors/codes.md`](src/errors/codes.md) — `OTP_CODES` / `OtpError`. - [`errors/zod-map.md`](src/errors/zod-map.md) — Zod → code mapper. ## Standards - RFC 4226 — HOTP (counter-based). - RFC 6238 — TOTP (time-based). - RFC 6287 — OCRA (challenge-response). - RFC 4648 §6 — Base32. - Google Authenticator Key URI Format — `otpauth://` scheme. ## License MIT