3 ms·
Well, the key part essentially is just like that, it's the single line mac = hmac.new(secret_bytes, counter_bytes, digest).digest() and everything else i
by PeterisP 7y ago
Well, the key part essentially is just like that, it's the single line
mac = hmac.new(secret_bytes, counter_bytes, digest).digest()
and everything else is just converting data to/from the proper format for this function.
- anamexis 7y agoWell sure, but given that TOTP is itself just formatted HMAC, that "everything else" of formatting is the essence of TOTP. Otherwise you probably wouldn't say you're implementing TOTP, you'd say you're implementing HMAC.