This commit is contained in:
Matthieu Bourgain 2024-04-22 18:17:49 +02:00
commit 88f900461d
No known key found for this signature in database
GPG key ID: 33BA95C808890C39
2 changed files with 3 additions and 4 deletions

View file

@ -117,5 +117,4 @@ def mysql_sha256_password_hash_hex(password, salt):
iteration = 1000 * count
digest = _sha256_digest(password, salt, iteration)
generated_hash = "$A${0:>03}{1}{2}".format(count, salt, digest).encode()
return "0x{0}".format(generated_hash.hex().upper())
return "$A${0:>03}${1}{2}".format(count, salt, digest).encode().hex().upper()