Commit Graph

16 Commits

Author SHA1 Message Date
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