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)