Skip to content

elttil/TOTP

Repository files navigation

Simple TOTP

A super simple application that takes in a TOTP secret key and returns the TOTP code.

This application is intended to be used in combination with other utilities. A example is included in the file dmenu_select.sh which will give you a dmenu prompt to select any of the files in ~/.config/totp/ that will contain TOTP keys. It will then put the TOTP token of said file in the clipboard.

Install

git clone --recurse-submodules https://github.com/elttil/totp
cd totp
make
DESTDIR=$HOME/.local/ make install

Usage

totp -t [UNIX time] -d [digit] -i [interval] -h(print this message) [file containing the secret]

Either a file containing the TOTP secret key can be given as the first argument. If no argument is supplied then it will by default read from stdin.

Example(s)

totp ./secret
echo JBSWY3DPEHPK3PXP | totp

Testing

This program has been tested by the test cases for SHA1 provided by rfc6238. How the tests work can be seen in test.sh and the test cases can be seen in test_cases.txt.

About

Shell application that takes in a TOTP secret and gives you the one time code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors