diff options
-rw-r--r-- | server/user_session.py | 4 |
1 files 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() |