hash - How does checking hashes work if no 2 hashes are ever the same? -


i may wrong here, understand, no 2 hashes ever same. certainly, when md5 word "password" twice, 2 different hashes.

if user's password "password123", hash "482c811da5d5b4bc6d497ffa98491e38"

if user enters password when logging in @ later date, hash of password123 is: "286755fad04869ca523320acce0dc6a4"

how can compare 2 hashes if they're different exact same word?

hash of same value same algorithm same - why ok compare hashes verify if values different (if hashes same may still mean values different, using sufficiently long hash sha256 may safe enough assume values same password verification).

most have bug in getting original values represented same way (i.e. non-trimmed spaces, different encoding,...) , causes hashes different.

note md5 not acceptable hashing passwords due known weakness.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -