From a0a4c66e63297244a42788dd05a68e15497918ff Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Tue, 8 Oct 2019 22:42:10 +1300 Subject: Add debug calculated HMAC output from decode-qr-uri.py --- decode-qr-uri.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/decode-qr-uri.py b/decode-qr-uri.py index 493f086..1f0489d 100755 --- a/decode-qr-uri.py +++ b/decode-qr-uri.py @@ -70,6 +70,8 @@ logging.debug("KDF Output: 0x%s", key.hex()) macedPayload = o.query[0:o.query.rfind('&')] # mac is last param, so can remove it this way hmacKey = key[16:48] +logging.debug("HMAC Key: 0x%s", hmacKey.hex()) + hmacer = hmac.new(hmacKey, digestmod=hashlib.sha256) hmacer.update(macedPayload.encode('utf-8')) hmacDigest = hmacer.digest() -- cgit v1.2.3