4 ms·
The hmac can be forgiven, in my opinion. But the ~30 lines of code for the Python stdlib's Base32-decoder, which would inflate the line count by 150%, is harder
by daneel_w 4y ago
The hmac can be forgiven, in my opinion. But the ~30 lines of code for the Python stdlib's Base32-decoder, which would inflate the line count by 150%, is harder to forgive.
b32-decoding can be made compact, of course: https://github.com/stolendata/totp/blob/master/totp.php#L16-L30 https://github.com/stolendata/totp/blob/master/totp.php#L16-...
- pletnes 4y agoBase32? The hard part is to implement QR code scanning across a range of different cameras, lighting conditions and shaky hands. Not to mention melting your own sand to make silicon.
- masklinn 4y agoDon't forget creating the rock which you then weather into sand. Frankly TFA should work a bit harder on this apple pie, this is just lazy.