summaryrefslogtreecommitdiff
path: root/passlib/handlers/django.py
diff options
context:
space:
mode:
Diffstat (limited to 'passlib/handlers/django.py')
-rw-r--r--passlib/handlers/django.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/passlib/handlers/django.py b/passlib/handlers/django.py
index 229b885..e8d1ec9 100644
--- a/passlib/handlers/django.py
+++ b/passlib/handlers/django.py
@@ -205,6 +205,14 @@ class django_pbkdf2_sha256(DjangoVariableHash):
Optional number of rounds to use.
Defaults to 10000, but must be within ``range(1,1<<32)``.
+ :type relaxed: bool
+ :param relaxed:
+ By default, providing an invalid value for one of the other
+ keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
+ and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
+ will be issued instead. Correctable errors include ``rounds``
+ that are too small or too large, and ``salt`` strings that are too long.
+
This should be compatible with the hashes generated by
Django 1.4's :class:`!PBKDF2PasswordHasher` class.
@@ -250,6 +258,14 @@ class django_pbkdf2_sha1(django_pbkdf2_sha256):
Optional number of rounds to use.
Defaults to 10000, but must be within ``range(1,1<<32)``.
+ :type relaxed: bool
+ :param relaxed:
+ By default, providing an invalid value for one of the other
+ keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
+ and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
+ will be issued instead. Correctable errors include ``rounds``
+ that are too small or too large, and ``salt`` strings that are too long.
+
This should be compatible with the hashes generated by
Django 1.4's :class:`!PBKDF2SHA1PasswordHasher` class.