Calculating TOTP with bash

A colleague of mine has just posted a shell script for calculating TOTP secrets. From my POV, using a Python virtual env is overkill, and I was pretty sure that you could do it with bash and a few extra utilities as well. The bash script would probably even be faster (albeit not necessarily more secure, unless you’d gotten all the quotes right). There’s a “proper” shell implementation by Rich Felker on Github, which I didn’t read before implementing a bash-non-posix solution....

January 8, 2024