Skip to content

Commit d69764d

Browse files
authored
fix readme (#1118)
1 parent 296f5d0 commit d69764d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ As of 3.0.0 the ``$2y$`` prefix is still supported in ``hashpw`` but deprecated.
123123
Maximum 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
128129
password with a cryptographic hash (such as ``sha256``) and then base64
129130
encode it to prevent NULL byte problems before hashing the result with
130131
``bcrypt``:

0 commit comments

Comments
 (0)