The cap should actually be due to the hashing algorithm. Every password should be the exact same length once it is salted and hashed, so the actual length of the password doesn’t make a difference in regards to database size. The hash will be a set length, so the storage requirements will be the same regardless. Hashing algorithms have a maximum length, (IIRC the most popular ones cap at 128 characters), but the salt is also counted in that limit. So if they’re using a 32 character salt, then the functional cap would be 96 characters.
Low character caps are a huge red flag, because it means they’re likely not hashing your password at all. They’re just storing them in plaintext and capping the length to save storage space, which is the first mortal sin of password storage.
Redjard@lemmy.dbzer0.com 1 day ago
That is a huge red flag if ever given as a reason, you never store the password.
You store a hash which is the same length regardless of the password.
scintilla@lemm.ee 1 day ago
Youre right lol. I forgot that hash lengths are different from the actually password length.
Cethin@lemmy.zip 1 day ago
Although at some point you’ll get collisions, but I don’t think that’s actually an issue. It still equally hard to guess a password from the hash, there will just be some solutions that are much longer than others.