secretutils¶
Secret utilities.
New in version 3.5.
-
oslo_utils.secretutils.
crypt_mksalt
(method)¶ Make salt to encrypt password string
This is provided as a replacement of crypt.mksalt method because crypt module was removed in Python 3.13.
New in version 8.0.
-
oslo_utils.secretutils.
crypt_password
(key, salt)¶ Encrtpt password string and generate the value in /etc/shadow format
This is provided as a replacement of crypt.crypt method because crypt module was removed in Python 3.13.
New in version 8.0.
-
oslo_utils.secretutils.
md5
(string=b'', usedforsecurity=True)¶ Return an md5 hashlib object using usedforsecurity parameter
For python distributions that support the usedforsecurity keyword parameter, this passes the parameter through as expected. See https://bugs.python.org/issue9216