This will have *zero* effect on any actual, real-world or otherwise just tangentially relevant physically viable situation, but at this point I am fed up with receiving a daily dose of overly verbose machine soup from yet another random LLM-bro who's playing security researcher, so there you have it, now ffs leave me in peace to do some *actual* work, and keep your tech-fantasy wanking to yourself, thank you very much.

This commit is contained in:
Mark Qvist 2026-08-16 21:34:34 +02:00
parent 3db15dae44
commit ce81b339dc
No known key found for this signature in database
2 changed files with 7 additions and 2 deletions

View file

@ -180,4 +180,9 @@ def digest(key, msg, digest):
outer.update(key.translate(trans_5C))
inner.update(msg)
outer.update(inner.digest())
return outer.digest()
return outer.digest()
def _cd_internal(a, b): return a == b
try: from hmac import compare_digest as _cd
except ImportError: _cd = _cd_internal
compare_digest = _cd

View file

@ -80,7 +80,7 @@ class Token():
received_hmac = token[-32:]
expected_hmac = HMAC.new(self._signing_key, token[:-32]).digest()
if received_hmac == expected_hmac: return True
if HMAC.compare_digest(received_hmac, expected_hmac): return True
else: return False