Concept Flow - Password storage best practices
User enters password
Generate salt
Hash password + salt
Store salt + hash in DB
User login attempt
Retrieve salt + hash from DB
Hash entered password + salt
Compare hashes
Grant or deny access
This flow shows how a password is salted and hashed before storage, then verified on login by hashing the entered password with the stored salt and comparing hashes.