Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msantos/totp.c
simple, standalone TOTP without dependencies
https://github.com/msantos/totp.c
capsicum pledge seccomp setrlimit totp
Last synced: 16 days ago
JSON representation
simple, standalone TOTP without dependencies
- Host: GitHub
- URL: https://github.com/msantos/totp.c
- Owner: msantos
- License: bsd-3-clause
- Created: 2019-04-26T13:59:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T12:18:41.000Z (12 months ago)
- Last Synced: 2023-12-08T13:28:14.114Z (12 months ago)
- Topics: capsicum, pledge, seccomp, setrlimit, totp
- Language: C
- Homepage:
- Size: 40 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
totp.c: simple, standalone TOTP
===============================totp.c is a small, simple, standalone command line TOTP
([RFC6238](https://tools.ietf.org/html/rfc6238)) without any external
dependencies.`totp.c` was written by
[David M. Syzdek](https://gist.github.com/syzdek/eba233ca33e1b5a45a99).The standalone `hmac_sha1` implementation is by
[Bob Liu](https://github.com/Akagi201/hmac-sha1).Building
--------# use the default rlimit sandbox
make# use the seccomp sandbox
RESTRICT_PROCESS=seccomp make clean all# disable the sandbox
RESTRICT_PROCESS=null make clean all#### using musl
RESTRICT_PROCESS=rlimit ./musl-make## linux seccomp sandbox: requires kernel headers
# clone the kernel headers somewhere
cd /path/to/dir
git clone https://github.com/sabotage-linux/kernel-headers.git# then compile
MUSL_INCLUDE=/path/to/dir ./musl-make clean allUsage
-----Usage: totp [ [ ] ]
totp YW2N4W7UBAIAEVCT
# 30 second intervals (default)
totp YW2N4W7UBAIAEVCT 30# previous window
totp YW2N4W7UBAIAEVCT 30 -30# next window
totp YW2N4W7UBAIAEVCT 30 30# read key from stdin
echo YW2N4W7UBAIAEVCT | totp - 30Why?
----I needed a simple TOTP application that could be statically linked for
use on an old powerpc linux device.