Commit Graph

8 Commits

Author SHA1 Message Date
Lucas 41ca24d151 Add TOTP support
Add all the test vectors from RFC 6238, but comment the non-SHA1 ones
for the time being.
2020-06-14 17:31:33 +00:00
Lucas 22333c5d6e Change totp to take a uint64_t instead of time_t
Let the application deal with converting time_t to uint64_t. For TOTP,
it's just a counter.

While there, rename 'granularity' to 'step', as it's used in RFC 6238.
2020-06-14 17:13:07 +00:00
Lucas 9a5f0f724e Use strtonum-like functions for parsing numeric arguments 2020-06-14 17:12:55 +00:00
Lucas 55b0b396dc Small update to err.[ch] 2020-06-14 15:00:33 +00:00
Lucas 84587a4c32 Add test cases for HOTP 2020-06-14 04:21:11 +00:00
Lucas 92539dcf58 Add basic CLI support for HOTP 2020-06-14 04:20:51 +00:00
Lucas a28d7cca02 Add HOTP implementation 2020-06-14 04:02:13 +00:00
Lucas 46dd62038f Initial commit 2020-06-14 03:23:29 +00:00