From b01fac96415014bbec98dbbf6147b2a274efbb68 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 3 May 2020 18:34:29 -0700 Subject: [PATCH] Fix loging on Python 2 --- lib/hashing_passwords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hashing_passwords.py b/lib/hashing_passwords.py index f340079e..93ae5e12 100644 --- a/lib/hashing_passwords.py +++ b/lib/hashing_passwords.py @@ -56,6 +56,6 @@ def check_hash(password, hash_): # Same as "return hash_a == hash_b" but takes a constant time. # See http://carlos.bueno.org/2011/10/timing.html diff = 0 - for char_a, char_b in zip(hash_a, hash_b): + for char_a, char_b in zip(bytearray(hash_a), bytearray(hash_b)): diff |= char_a ^ char_b return diff == 0