secretutils

Secret utilities.

Added in version 3.5.

oslo_utils.secretutils.crypt_mksalt(method: str) str

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.

Added in version 8.0.

oslo_utils.secretutils.crypt_password(key: str, salt: str) str

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.

Added in version 8.0.