Refonte authentification en crypté

This commit is contained in:
2025-08-16 14:02:01 +02:00
parent 15665f7c4c
commit 726a35c1a6
12 changed files with 325 additions and 37 deletions

13
mkhash.py Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
import sys, getpass, bcrypt
def main():
if len(sys.argv) > 1:
password = sys.argv[1]
else:
password = getpass.getpass("Mot de passe: ")
h = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt(rounds=12)).decode("ascii")
print(h)
if __name__ == "__main__":
main()