Skip to content
Sharp

Authentication · interview question

Why does adding a 'salt' to a password before hashing help in practice?

Multiple choiceMediumchapter-17-curatedpremiumauthenticationplaintext-passwords
Choose one answer
Answer and explanation

Correct answer

A. It ensures that identical passwords have unique hashes.

Why

Salting ensures that even if two users have the same password, their salted hashes will be different, thus protecting against rainbow table attacks.

Test yourself on Authentication

A free test with instant, explained results. No account needed.

Start free test
All Authentication questions →