Switch to passlib.PasswordHash.hash
[mudpy.git] / mudpy / password.py
index 3e0db0a..a0be03e 100644 (file)
@@ -1,8 +1,8 @@
 """Password hashing functions and constants for the mudpy engine."""
 
-# Copyright (c) 2004-2015 Jeremy Stanley <fungi@yuggoth.org>. 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
 
@@ -12,7 +12,7 @@ _CONTEXT = passlib.context.CryptContext(
 
 
 def create(password):
-    return _CONTEXT.encrypt(password)
+    return _CONTEXT.hash(password)
 
 
 def verify(password, encoded_hash):