From ae460f25e34c912a644dd29c34d83389b31310f4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 27 Jan 2019 19:14:04 +0000 Subject: [PATCH] Switch to passlib.PasswordHash.hash Starting with passlib 1.7 the PasswordHash.encrypt() method has been renamed to PasswordHash.hash() for clarity, and the old name deprecated. Use the new name and update our minimum passlib dependency version accordingly. --- mudpy/password.py | 4 ++-- requirements.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mudpy/password.py b/mudpy/password.py index f5638cb..a0be03e 100644 --- a/mudpy/password.py +++ b/mudpy/password.py @@ -1,6 +1,6 @@ """Password hashing functions and constants for the mudpy engine.""" -# Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, +# Copyright (c) 2004-2019 mudpy authors. Permission to use, copy, # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. @@ -12,7 +12,7 @@ _CONTEXT = passlib.context.CryptContext( def create(password): - return _CONTEXT.encrypt(password) + return _CONTEXT.hash(password) def verify(password, encoded_hash): diff --git a/requirements.txt b/requirements.txt index 092317a..fc14974 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -# Copyright (c) 2014-2016 mudpy authors. Permission to use, copy, +# Copyright (c) 2014-2019 mudpy authors. Permission to use, copy, # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. -passlib +passlib>=1.7 pyyaml -- 2.11.0