summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.context.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/lib/passlib.context.rst')
-rw-r--r--docs/lib/passlib.context.rst12
1 files changed, 12 insertions, 0 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``