Commit Graph

28 Commits

Author SHA1 Message Date
b4f82ebfda add option to show help 2025-03-08 19:31:05 +01:00
21a4c231a3 add command line parameter to print the version
The version is defined in build.zig. We use git describe to the
the build version. For release versions we enforce that the version
in build.zig and build.zig.zon must be equal to the output of
git describe.
2025-03-08 19:19:52 +01:00
dd32db056e Make it possible to validate a code. 2025-02-22 20:45:37 +01:00
e9168203f5 add bash completion script 2024-11-24 15:43:10 +01:00
0df5a7a5ce add another link to totp spec 2024-09-20 16:24:48 +02:00
ec75712d04 on windows the env var for home seems to be HOMEPATH 2024-09-20 15:29:30 +02:00
a60fadd248 make compilable on windows 2024-09-20 15:20:39 +02:00
51def513e3 improve more error messages 2024-09-11 13:45:24 +02:00
1efad3d45c improve error message if argument for --config is missing 2024-09-10 08:47:13 +02:00
a41eed98bb better error message when there is no parameter after 'show' 2024-09-09 19:01:20 +02:00
c0704a604b add error message for authenticator not found 2024-09-09 18:42:41 +02:00
7edfe2dfff add referene to the spec for otpauth urls (which is still a draft) 2024-09-09 17:57:40 +02:00
a9f9becc41 add support for algorithms SHA256 and SHA512 2024-09-09 15:38:55 +02:00
8b452af848 extract method to compute the totp code based on a pre-computed hmac
This will make it easier to add support for differen hmac algorithms,
because we can reuse the method.
2024-09-09 15:08:05 +02:00
0f5fd3f561 add 'algorithm' to OtpAuthUrl
Currently the parameter is not evaluated.
2024-09-09 14:47:22 +02:00
d0f5860a44 ignore directory .zig-cache
The pre-release version of zig 0.13.0 was using 'zig-cache', but the
release version uses '.zig-cache'.
2024-09-09 14:30:46 +02:00
39bcda689d use arena allocator, because this is a short lived cli tool 2024-09-09 09:40:27 +02:00
ba9e6b06b6 fix some memory leaks and add better error handling 2024-09-08 11:48:28 +02:00
622391a67d add test cases from RFC-6238 2024-09-07 12:39:43 +02:00
a926906e91 finalize computation of the code 2024-09-07 10:42:39 +02:00
36b19427e3 better parsing of the otpauth url
Multiple parameters can be parsed. And we can set the period and digits
via the url.
2024-09-02 18:57:20 +02:00
0afbb7a757 Base32 decoding with optional padding 2024-09-01 17:58:51 +02:00
c8efdbdffe Adding Base32 decode method
It can currently decode when the encoded string is a multiple of 8
bytes.
2024-09-01 10:44:50 +02:00
044b2e3e8f fix memory leak and remove 'add' 2024-08-27 19:45:48 +02:00
8854646cda extract method to read the config file 2024-08-27 19:12:28 +02:00
d1cf64bdcb cleanup 2024-08-27 18:59:50 +02:00
ecb7bacfa1 list command 2024-08-27 18:39:21 +02:00
68f55396e3 initial commit 2024-08-17 14:15:19 +02:00