X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fpassword.py;h=a0be03ed1ec7f1482b1964147c01deb32fe94b63;hp=a34dab9438f36b370b98596fe2548338e83d266f;hb=ae460f25e34c912a644dd29c34d83389b31310f4;hpb=91f6b37e5fc36953cc1f3150695382d0822b0672 diff --git a/mudpy/password.py b/mudpy/password.py index a34dab9..a0be03e 100644 --- a/mudpy/password.py +++ b/mudpy/password.py @@ -1,18 +1,18 @@ """Password hashing functions and constants for the mudpy engine.""" -# Copyright (c) 2004-2015 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# 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. import passlib.context _CONTEXT = passlib.context.CryptContext( - all__vary_rounds=0.1, default="pbkdf2_sha512", - pbkdf2_sha512__default_rounds=1000, schemes=["pbkdf2_sha512"]) + default="pbkdf2_sha512", pbkdf2_sha512__default_rounds=1000, + schemes=["pbkdf2_sha512"]) def create(password): - return _CONTEXT.encrypt(password) + return _CONTEXT.hash(password) def verify(password, encoded_hash):