scorpiox-otpbuild

TOTP one-time password generator implemented in pure C with zero external dependencies. Generate RFC 6238 compliant time-based one-time passwords.

Linux x64 Linux ARM64 macOS ARM64 Windows x64

Description

scorpiox-otp is a lightweight TOTP (Time-based One-Time Password) generator built in pure C with zero external dependencies. It implements RFC 6238 (TOTP) and RFC 4226 (HOTP) algorithms using a built-in HMAC-SHA1 implementation. The tool accepts a base32-encoded secret key and produces a 6-digit time-based code that refreshes every 30 seconds — compatible with Google Authenticator, Authy, 1Password, and any other standard TOTP application. Designed for CI/CD pipelines, automation scripts, and headless environments where a GUI authenticator app is unavailable.

⚙️ Flags & Options (1)

Flag Short Description Takes Value
--help -h Display help information and usage Yes

💡 Usage Examples

# Generate a TOTP code from a base32 secret
$ scorpiox-otp JBSWY3DPEHPK3PXP
847293

# Use in a script to authenticate with a service
$ TOKEN=$(scorpiox-otp "$MY_TOTP_SECRET")
$ curl -H "X-OTP: $TOKEN" https://api.example.com/login

# Pipe secret from a secure vault
$ scorpiox-vault-git get totp-secret | xargs scorpiox-otp
193847

# Use in CI/CD pipeline for 2FA-protected deployments
$ scorpiox-otp "$DEPLOY_OTP_SECRET" | xargs -I {} curl -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-TOTP: {}" \
  https://deploy.example.com/release

# Display help
$ scorpiox-otp --help

📦 Source & Build Info

Source File
scorpiox/scorpiox-otp.c
Lines of Code
284
Dependencies
None (pure C, zero dependencies)
Platforms
4 platforms

🔗 Related Tools