summaryrefslogtreecommitdiff
path: root/docs/lib
diff options
context:
space:
mode:
Diffstat (limited to 'docs/lib')
-rw-r--r--docs/lib/passlib.context.rst12
-rw-r--r--docs/lib/passlib.utils.handlers.rst4
2 files changed, 12 insertions, 4 deletions
diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst
index 312f55c..a85ba52 100644
--- a/docs/lib/passlib.context.rst
+++ b/docs/lib/passlib.context.rst
@@ -153,6 +153,18 @@ Options which directly affect the behavior of the CryptContext instance:
.. seealso:: :ref:`context-migration-example` in the tutorial
+:samp:`truncate_error`
+
+ By default, some algorithms will truncate large passwords
+ (e.g. :class:`~passlib.hash.bcrypt` truncates ones larger than 72 bytes).
+ Such hashes accept a ``truncate_error=True`` option to make them
+ raise a :exc:`~passlib.exc.PasswordTruncateError` instead.
+
+ This can also be set at the CryptContext level,
+ and will passed to all hashes that support it.
+
+ .. versionadded:: 1.7
+
.. _context-min-verify-time-option:
``min_verify_time``
diff --git a/docs/lib/passlib.utils.handlers.rst b/docs/lib/passlib.utils.handlers.rst
index aad970a..1c55158 100644
--- a/docs/lib/passlib.utils.handlers.rst
+++ b/docs/lib/passlib.utils.handlers.rst
@@ -178,10 +178,6 @@ of the unittest for :class:`passlib.hash.des_crypt`::
# [required] - store the handler object itself in the handler attribute
handler = des_crypt
- # [optional] - if your hash only uses the first X characters of the password,
- # set that value here. otherwise leave the default (-1).
- secret_size = 8
-
# [required] - this should be a list of (password, hash) pairs,
# which should all verify correctly using your handler.
# it is recommend include pairs which test all of the following: