3 ms·
> bcrypt or (god forbid) your secure hashing algorithm of choice doesn't care about input length bcrypt itself accepts a maximum key size of 56/72 bytes (depen
by elithrar 12y ago
> bcrypt or (god forbid) your secure hashing algorithm of choice doesn't care about input length
bcrypt itself accepts a maximum key size of 56/72 bytes (depending on stage) as per http://en.wikipedia.org/wiki/Bcrypt#User_input http://en.wikipedia.org/wiki/Bcrypt#User_input
To a user it may not matter (they won't know what is being truncated) but from a systems design POV you should limit the unnecessary. Why let users POST 1MB text strings to your server if you're just going to discard them?