first commit
This commit is contained in:
18
repertoire_identifiants_mot_de_passe.py
Normal file
18
repertoire_identifiants_mot_de_passe.py
Normal file
@@ -0,0 +1,18 @@
|
||||
_repertoire_identifiants_mot_de_passe= {
|
||||
"Alban": "mot_de_passe",
|
||||
}
|
||||
|
||||
def verif_user(Identifiant: str, Mot_de_passe: str) -> bool:
|
||||
#
|
||||
if _repertoire_identifiants_mot_de_passe.get(Identifiant, "Inconnu") == Mot_de_passe:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def add_user(Identifiant: str, Mot_de_passe: str) -> None:
|
||||
"""Ajoute ou remplace une entrée du répertoire."""
|
||||
with open('mots_de_passe_identifiants.txt','a') as f :
|
||||
f.write(Identifiant)
|
||||
f.write(';;')
|
||||
f.write(Mot_de_passe)
|
||||
f.write("\n")
|
||||
Reference in New Issue
Block a user