This commit is contained in:
missytake
2024-06-19 14:42:27 +02:00
parent 736c67ac1f
commit 3eae1657de

View File

@@ -25,7 +25,7 @@ class UnknownCommand(ValueError):
def encrypt_password(password: str): def encrypt_password(password: str):
# https://doc.dovecot.org/configuration_manual/authentication/password_schemes/ # https://doc.dovecot.org/configuration_manual/authentication/password_schemes/
pw = passlib.hash.sha512_crypt.hash(password).split("$") pw = passlib.hash.sha512_crypt.hash(password).split("$")
return "{SHA512-CRYPT}$" + pw[1] + "$" + pw[3] + "$" + pw[4] return "{SHA512-CRYPT}$" + pw[1] + "$" + pw[3] + "$" + pw[4]