ich folgende script from the passlib docs bin mit einem Passwort hash: - warum gibt es nicht nur einen Hash für dieses Kennwort mehrere unterschiedliche Hashes als „toomanysecrets“, um zu überprüfenWarum erstellt dieses Passlib-Hash-Skript jedes Mal ein neues Ergebnis, wenn ich das Skript ausführe?
# import the hash algorithm
from passlib.hash import sha256_crypt
# generate new salt, and hash a password
hash = sha256_crypt.encrypt("toomanysecrets")
print hash # <== WHY IS THIS ALWAYS A DIFFERENT STRING?
# verifying the password
print sha256_crypt.verify("toomanysecrets", hash) # Outputs "True"
print sha256_crypt.verify("joshua", hash) # Outputs "False"
Es scheint seltsam, dass sha256_crypt.verify
der Lage wäre, ?
'neues Salz erzeugen' –