From 816d11b6e238e389f84430196bed19d66f49d751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Tue, 25 Aug 2015 08:53:25 +0200 Subject: Fix a typo. --- server/user_session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/user_session.py b/server/user_session.py index e418f8d..b12d6f1 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -97,7 +97,7 @@ def verify_password(plain_password, encrypted_password): elts = encrypted_password.split('$') if len(elts) != 4: return False - if elts[0] != 'pkbdf2_sha256': + if elts[0] != 'pbkdf2_sha256': return False try: rounds = int(elts[1]) @@ -115,7 +115,7 @@ def encrypt_password(plain_password): chosen_chars.append(_salt_chars[random.randrange(0, _salt_chars_len)]) salt = ''.join(chosen_chars) enc = hashlib.pbkdf2_hmac('sha256', plain_password.encode('utf-8'), salt.encode('utf-8'), rounds) - return '{0}${1}${2}${3}'.format('pkbdf2_sha256', rounds, salt, base64.b64encode(enc).decode('utf-8')) + return '{0}${1}${2}${3}'.format('pbkdf2_sha256', rounds, salt, base64.b64encode(enc).decode('utf-8')) random.seed() -- cgit v1.2.1