Commit Briefs

Omar Polo

totp: remove some (good) BSD-isms (getprogname(), strtonum())

Don't want to add a configure script for this, so to aid portability and avoid having to link to libbsd pretend we don't have these two niceties. err/warn are still in use and won't be removed.



Omar Polo

totp: support other algorithms too


Omar Polo

add support for the `digits' query argument

allow to print also 7 and 8 digits long codes in addition to the current defaut of 6. Requested by heph


Omar Polo

for completeness, percent-decode the secret if needed

it shouldn't EVER be needed, but since we handle URIs we should tick this box too.




Omar Polo

totp: extract the secret from otpauth:// URIs

More often than not, services provide the URI for TOTP and not the raw secret. While it's easy to manually extract the secret from the querystring, teach totp how to do that on behalf of the user. Manpage bits will follow. Discussed with heph.


Omar Polo

simplify b32decode; no functional change

no need to take an explicit length parameter when we can just advance the string until a NUL byte. base32 doesn't allow NUL bytes.


Omar Polo

add a companion TOTP utility