Hacker News new | ask | show | jobs
by iancarroll 4403 days ago
because if they were hashed, spaces would be irrelevant (hashes don't have spaces)
3 comments

You can apply a hashing algorithm to a string that contains spaces. The spaces are very much relevant.

In MD5 "String with spaces" yields eab431cd212fb8b5ae223acbcfe58cca

"Stringwithspaces" gives 3cd297b2d7e48709d92890f88abdde0a

I meant the hashes themselves wouldn't have spaces, therefore any odd database storage requirement wouldn't matter.
its probably because of dumb users. user makes password with spaces, then tries with without spaces and cant figure out why it wont work...
I don't know why this is getting downvoted. It's pretty easy to have accidently insert leading or trailing whitespace when copying/pasting a password.

(Users should never store passwords in plain text or email them to one-another but the reality is they do.)

client-side validation?