File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,9 @@ As of 3.0.0 the ``$2y$`` prefix is still supported in ``hashpw`` but deprecated.
123123Maximum Password Length
124124~~~~~~~~~~~~~~~~~~~~~~~
125125
126- The bcrypt algorithm only handles passwords up to 72 characters, any characters
127- beyond that are ignored. To work around this, a common approach is to hash a
126+ Passing ``hashpw `` a password longer than 72 bytes now raises a ``ValueError ``.
127+ Previously the password was silently truncated, following the behavior of the
128+ original OpenBSD ``bcrypt `` implementation. To work around this, a common approach is to hash a
128129password with a cryptographic hash (such as ``sha256 ``) and then base64
129130encode it to prevent NULL byte problems before hashing the result with
130131``bcrypt ``:
You can’t perform that action at this time.
0 commit comments