Comment on My password is not accepted because it is too long
Redjard@lemmy.dbzer0.com 1 week agoYou can easily get the hash of whole files, there is no input size constraint with most hashing functions.
Special password hashing implementations do have a limit to guarantee constant runtime, as there the algorithm always takes as long as the worst-case longest input. The standard modern password hashing function (bcrypt) only considers the first 72 characters for that reason, though that cutoff is arbitrary and could easily be increased, and in some implementations is. Having differences past the 72nd character makes passwords receive the same hash there, so you could arbitrarily change the password on eveey login until the page updates their hashes to a longer password hashing function, at which point the password used at next login after the change will be locked in.