From 9d6286314db78f8e2cda1e44170e84eb943b5169 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 27 Nov 2015 11:36:04 +0100 Subject: [PATCH] Rename hash. --- accountant/api/models/users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accountant/api/models/users.py b/accountant/api/models/users.py index 2cafe42..51a495c 100644 --- a/accountant/api/models/users.py +++ b/accountant/api/models/users.py @@ -15,7 +15,7 @@ along with Accountant. If not, see . """ # vim: set tw=80 ts=4 sw=4 sts=4: -from passlib.hash import sha256_crypt +from passlib.hash import sha256_crypt as crypt from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer, BadSignature, SignatureExpired) @@ -45,10 +45,10 @@ class User(UserMixin, db.Model): @classmethod def hash_password(cls, password): - return sha256_crypt.encrypt(password) + return crypt.encrypt(password) def verify_password(self, password): - return sha256_crypt.verify(password, self.password) + return crypt.verify(password, self.password) def generate_auth_token(self, expiration=600): serializer = Serializer(app.config['SECRET_KEY'], expires_in=expiration)