5 ms·
MFA - what you have. I personally prefer this golang library to generate my OTP codes https://github.com/pquerna/otp https://github.com/pquerna/otp as it's muc
by tedk-42 7y ago
MFA - what you have.
I personally prefer this golang library to generate my OTP codes https://github.com/pquerna/otp https://github.com/pquerna/otp as it's much faster than running a python script.
My personal computer is the 'what I have' to do the second factor of authentication for most sites via a shell script, followed by xclip (linux) or pbcopy (mac). I prefer this over browser extensions using javascript to paste in your OTP code for you.
- icebraining 7y agoIf you want raw speed, oathtool is hard to beat. Only 132KB to load to memory, compared to the megabytes of the typical Go binary. But unless you're playing an FPS where you have to input TOTP codes to shoot, this script is probably fast enough (80ms on my old laptop).
- Thorrez 7y agoThe python binary itself will take some memory. Although maybe it can be shared with other running python processes.
- userbinator 7y agoOnly 132KB to load to memory It's amusing to see people think 100KB+ is small, when the whole TOTP algorithm, including SHA1 (probably the biggest part), and the input/output conversion, likely needs only a few KB of code. With the exception of SHA1, everything else is doable in dozens of bytes.
- icebraining 7y agoTrue, but I'm just talking about the sizes of the binaries generated by the default settings of common compilers (gcc, in the case of oathtool), for comparing orders of magnitude. I'm sure there's plenty of fat you could trim by simply tuning the compilation a bit. (Oathtool also supports SHA2, since it may be used by other implementations, per the RFC. )