Codele / How software is built
Logins, passwords and tokens
A website must never keep your real password. It keeps a scrambled version, compares scrambles when you log in, then hands you a wristband.
- A site never stores your password. It stores a hash: a one-way scramble that cannot be turned back.
- At login it scrambles what you typed and compares the two scrambles.
- After login you get a token, like a wristband. You show it instead of sending the password again.
- Our letter-adding scramble is a toy. Real sites use slow, purpose-made methods such as bcrypt or Argon2, never a home-made one.
Loading the playable lesson…