🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Authentication, Sessions and JWT: all 10 questions

Quiz: Authentication, Sessions and JWT · Question 2 of 10

Why do we add a random salt to each password before hashing?

Why do we add a random salt to each password before hashing?

  1. A.To make the password shorter
  2. B.So identical passwords produce different hashes and precomputed tables are useless
  3. C.So the password can be decrypted later
  4. D.To make login faster
Answer & explanation

Correct answer: So identical passwords produce different hashes and precomputed tables are useless

The salt is stored with the hash and makes every user's hash unique.

Can you get the rest right without peeking?

Take the timed Quiz: Authentication, Sessions and JWT quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →