{
  "slug": "totp-generator",
  "name": "gizza-ai/totp-generator",
  "version": "0.1.0",
  "title": "TOTP Generator — 2FA codes from a secret — gizza.ai",
  "description": "Generate time-based one-time (2FA) codes from a TOTP secret, in your browser. The secret never leaves your device.",
  "tags": [
    "totp",
    "2fa",
    "authenticator",
    "one-time password",
    "otp",
    "two-factor"
  ],
  "category": "security",
  "urls": {
    "page": "https://gizza.ai/tools/totp-generator/",
    "markdown": "https://gizza.ai/tools/totp-generator/index.md",
    "descriptor": "https://gizza.ai/tools/totp-generator/tool.json",
    "deep_link_example": "https://gizza.ai/tools/totp-generator/?secret=JBSWY3DPEHPK3PXP&digits=6&algorithm=sha1"
  },
  "cli": "gizza tool totp-generator \"JBSWY3DPEHPK3PXP\"",
  "tool": {
    "description": "Generate a time-based one-time code (TOTP, RFC 6238 — the 2FA codes authenticator apps show) from a base32 secret. Uses the current time by default (pass timestamp to compute a code for a specific Unix time). digits (6-8, default 6), period (seconds, default 30), and algorithm (sha1 default / sha256 / sha512) are configurable. Returns the code and how many seconds it stays valid. Runs locally — the secret never leaves the device.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "default": "sha1",
          "description": "HMAC hash algorithm (default sha1, the standard for authenticator apps).",
          "enum": [
            "sha1",
            "sha256",
            "sha512"
          ],
          "type": "string"
        },
        "digits": {
          "description": "Number of digits in the code (6, 7, or 8; default 6).",
          "maximum": 8,
          "minimum": 6,
          "type": "integer"
        },
        "period": {
          "description": "Time step in seconds (default 30).",
          "maximum": 600,
          "minimum": 1,
          "type": "integer"
        },
        "secret": {
          "description": "The TOTP shared secret, base32-encoded (spaces and case are ignored).",
          "type": "string"
        },
        "timestamp": {
          "description": "Unix time in seconds to compute the code at; omit or 0 for the current time.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "secret"
      ],
      "type": "object"
    }
  }
}