libcotp

C library for generating TOTP and HOTP one-time passwords

brewmacoslinux
Try with needOr install directly
Source

About

C library that generates TOTP and HOTP

Commands

libcotp

Examples

Generate a TOTP token using a base32-encoded secret$ cotp-cli generate --secret JBSWY3DPEBLW64TMMQ====== --totp
Generate an HOTP token with a specific counter value$ cotp-cli generate --secret JBSWY3DPEBLW64TMMQ====== --hotp --counter 1
Verify a TOTP token against a secret$ cotp-cli verify --secret JBSWY3DPEBLW64TMMQ====== --token 123456