From 4a08687ac886af6064a59e8397b2cf2af8964e4d Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Tue, 11 Jun 2019 13:22:22 +0200 Subject: [PATCH] Make indexing more consistent --- solvable/src/webservice/crypto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solvable/src/webservice/crypto.py b/solvable/src/webservice/crypto.py index 051ff22..ff050a4 100644 --- a/solvable/src/webservice/crypto.py +++ b/solvable/src/webservice/crypto.py @@ -10,8 +10,8 @@ class PasswordHasher: @staticmethod def verify(password, salted_hash): - salt = bytes.fromhex(salted_hash[64:]) - hashdigest = bytes.fromhex(salted_hash[:64]) + salt = bytes.fromhex(salted_hash)[32:] + hashdigest = bytes.fromhex(salted_hash)[:32] return PasswordHasher.scrypt(password, salt) == hashdigest @staticmethod