When you create an account on a website, you type a password and press Sign Up. It feels simple, but what the site does next decides whether one data breach ruins your week or your whole digital life.
The wrong way: plain text
Some old or badly built systems store your password exactly as you typed it. If an attacker steals that database, every password is instantly readable. Worse, most people reuse passwords, so the attacker can try the same email and password on email, social media and banking sites.
The better way: hashing
A hash function turns any input into a fixed-length string of characters. The same input always gives the same output, but you can’t work backwards from the output to the original. When you log in, the website hashes what you typed and compares it with the stored hash. It never needs to know your real password.
In a lab session I used CyberChef to hash the same word with different algorithms. Changing even one letter produced a completely different result. That property is what makes hashing useful for checking data without revealing it.
Why hashing alone isn’t enough
Attackers can pre-compute hashes of millions of common passwords and compare them with a stolen database. If your password is “password123”, it will be found in seconds. Fast algorithms such as MD5 and SHA-1 are especially weak here, because modern hardware can test billions of guesses per second against them.
That’s why well-built systems add a unique random value, called a salt, to each password before hashing. They also use deliberately slow algorithms designed for passwords, such as bcrypt or Argon2. Salting means two users with the same password get different hashes, and slow hashing makes mass guessing expensive.
What you can do as a student
You can’t control how a website stores your password, but you can limit the damage:
- Use a long, unique password for every account. A password manager makes this realistic.
- Turn on two-factor authentication wherever it is offered.
- Check whether your email has appeared in a breach on a service like Have I Been Pwned.
- Change a password immediately if a service reports a breach.
The takeaway
Good security is mostly invisible. A site that hashes and salts passwords properly protects you even when it gets hacked. Until every site does, strong, unique passwords are your best defence.

