summaryrefslogtreecommitdiff
path: root/docs/lib
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-06-10 17:24:56 -0400
committerEli Collins <elic@assurancetechnologies.com>2016-06-10 17:24:56 -0400
commit61f94ee0cdf637f69140d75afd8f3e7ae857a700 (patch)
tree3378960a57c16b16c45fbfa5785163b10cf68009 /docs/lib
parent96ac33ed2f8104d6eb9713cd999eed568b37d119 (diff)
downloadpasslib-61f94ee0cdf637f69140d75afd8f3e7ae857a700.tar.gz
passlib.utils.handlers / HasRounds: the 'rounds' keyword is now treated
as a fallback for 'default_rounds', 'min_rounds', and 'max_rounds'. this makes it easier to specify a django-style policy of "deprecate all hashes which have a differing rounds value". * removed special handling from 'rounds' from CryptContext parser * tweaked affected CryptContext serialization tests * added test for new behavior
Diffstat (limited to 'docs/lib')
-rw-r--r--docs/lib/passlib.context.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst
index 5dc9d5f..bd692e9 100644
--- a/docs/lib/passlib.context.rst
+++ b/docs/lib/passlib.context.rst
@@ -181,6 +181,21 @@ in ``schemes``, and :samp:`{option}` one of the parameters below:
.. _context-default-rounds-option:
+:samp:`{scheme}__rounds`
+
+ Set the number of rounds required for this scheme
+ when generating new hashes (using :meth:`~CryptContext.hash`).
+ Existing hashes which have a different number of rounds will be marked
+ as deprecated.
+
+ This essentially sets ``default_rounds``, ``min_rounds``, and ``max_rounds`` all at once.
+ If any of those options are also specified, they will override the value specified
+ by ``rounds``.
+
+ .. versionadded:: 1.7
+
+ Previous releases of Passlib treated this as an alias for ``default_rounds``.
+
:samp:`{scheme}__default_rounds`
Sets the default number of rounds to use with this scheme