Cybersecurity: hashing passwords
A website must never store passwords in plain text: if the data leaks, every account is exposed. Instead it stores a fingerprint (hash): a function like SHA-256 turns a text into a string of characters, always the same for the same text, but impossible to reverse. Changing a single letter changes the whole fingerprint.
For passwords, the fingerprint must be salted and slow: the password is mixed with a salt (a value unique to each account) and the calculation is repeated thousands of times, so an attacker can't test billions of passwords. That's what slow_hash does; in production, use a proven function such as bcrypt, Argon2 or hashlib.pbkdf2_hmac. To check a login, we recompute the fingerprint of what the person types and compare it with the stored one.
import hashlib
for text in ["hello", "hello!", "hello"]:
print(text, "->", hashlib.sha256(text.encode()).hexdigest()[:16])