-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial TOTP watch face impl #23
Conversation
Vendor code from https://github.com/Netthaw/TOTP-MCU to do the heavy lifting of computing SHA-1 and HMAC and the rest of TOTP Also implement a date_time to unix timestamp method
A few things that are probably worth discussing here:
|
|
I tested your UNIX time conversion and it looks good! I would definitely like to put this functionality in the watch library. Rather than me pasting the code in, I figure it's preferable for you to add it, to preserve authorship? I added documentation in watch_utility.h and a stub in watch_utility.c; you can just move your function over there (the parameters are all the same). I also found if you re-add the |
Cool, I've filled out the stub function, thanks for thinking about preserving authorship 😄 I also properly vendored the TOTP-MCU dependency, I had added it as a submodule and attempted to revert that, but I messed it up. I think it can be added back as a submodule that gets pulled automatically as part of the Makefile, but I'm too tired and new to make to do that well right now. Maybe in a follow up PR? |
That sounds cool, I wonder if you could have the initial version just be an interactive setup thingy over USB serial, like how the buspirate is configured? |
Ok, marked this as ready to merge. I can follow up to have support for multiple codes, since (IMO) small PRs are good PRs |
I've also just noticed a bug where I am not left-padding the code with
zeroes. Will fix later tonight unless you get to it first
…On Tue., Nov. 23, 2021, 16:00 joeycastillo, ***@***.***> wrote:
I tested your UNIX time conversion and it looks good! I would definitely
like to put this functionality in the watch library. Rather than me pasting
the code in, I figure it's preferable for you to add it, to preserve
authorship? I added documentation in watch_utility.h and a stub in
watch_utility.c; you can just move your function over there (the parameters
are all the same).
I also found if you re-add the timestamp -= utc_offset line that you had
alluded to in an earlier revision, it seems to handle the UTC offsetting
quite nicely!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYSENI6AS44YNK34NVH4LUNP6ILANCNFSM5ISOMKDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I can make that change! I also need to make a couple of small tweaks to the TOTP library; need to move some of sha1's declarations from the header to the source file, because it's causing linker issues with my version of GCC. |
Vendor code from https://github.com/Netthaw/TOTP-MCU to do the
heavy lifting of computing SHA-1 and HMAC and the rest of TOTP
Also implement a date_time to unix timestamp method