2 ms·
The only way "fixed width database field" makes any sense is if they're storing in plaintext, which is stupid all on its own.
by drivebyacct2 14y ago
The only way "fixed width database field" makes any sense is if they're storing in plaintext, which is stupid all on its own.
- cpeterso 14y agoWouldn't a password hash, possibly truncated, fit into a "fixed width database field"?
- drivebyacct2 14y agoWhy would you truncate it? My point was simply thus: if one is hashing a password... every password will be the same length (strlen(sha1("a")))==(strlen(sha1("somereallybigstring"))). Thus, the column would be the right size for the hash always and would be completely unrelated to the user's inputted password. Not sure I interpreted your message correctly, but either way, the DB field should be unrelated to the length or limit of length put on the user password. It should only be correlated to the length of the hash produced. (Truncating seems like it would narrow the space for collisions, those bits are there in the hash for a reason).