Re: Tea
Well, something almost, but not quite, entirely unlike tea.
343 publicly visible posts • joined 13 Aug 2021
> That works if you assume salt+password. In that case, you hash (say) salt+letmein, and can immediately identify the 20% of users whose password was letmein.
Yes, but the point of having a salt is that it's different for each user. So you shouldn't be able to find all the letmein passwords in that way.
Nobody stores a password in a database - you store a salted hash and compare those.
But strcmp is the wrong function to use. A human wrote that to return as soon as the answer is known, which is as soon as a character differs. The optimiser had nothing to so with it.
Also, that would be in glibc, your -O3 is not going to recompile that anyway.
You want a function that has to compare every character. Maybe something that returns how good of a match it was.
But the XB-70 Valkyrie was way cooler.