libcotp
« Back to VersTracker
Description:
C library that generates TOTP and HOTP
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Security
Tags: security authentication totp hotp 2fa c-library
Install: brew install libcotp
About:
Libcotp is a lightweight C library designed for generating Time-based One-Time Passwords (TOTP) and HMAC-based One-Time Passwords (HOTP) according to RFC 6238 and RFC 4226 standards. It provides a secure and efficient solution for developers needing to implement two-factor authentication (2FA) in their applications without heavy dependencies.
Key Features:
  • Supports both TOTP and HOTP algorithms
  • Minimal dependencies and lightweight footprint
  • C99 compliant and portable
  • Includes encryption utilities for secret handling
Use Cases:
  • Integrating 2FA into C-based applications and services
  • Building custom authentication servers or CLI tools
  • Adding OTP generation to embedded systems
Alternatives:
  • google-authenticator-libpam – Provides PAM integration for system-wide 2FA, whereas libcotp is a library for application-level integration.
  • oathtool – Command-line utility for OTP generation, while libcotp is a library for building OTP functionality into software.
Version History
Detected Version Rev Change Commit
Sep 24, 2025 2:12pm 0 VERSION_BUMP 22bdbaf6