4 ms·
bycrypt has a limit of 72 bytes (not characters) and possibly less depending on the specific implementation. Theoretically this could limit you to only 18 chara
by ChrisSD 7y ago
bycrypt has a limit of 72 bytes (not characters) and possibly less depending on the specific implementation. Theoretically this could limit you to only 18 characters if your password is utf-8 encoded emoji (4 bytes per character).
This can be worked around by the server hashing the password using a fast hash before passing it to bcrypt but this risks reducing the security of the password.
- eru 7y agoNo, this doesn't reduce the security of the password at all, if your first fast hash is well distributed. Eg use the first 72 bytes of SHA256, if you like overkill.