summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-04-27 02:30:21 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-04-27 02:30:21 -0400
commit7a0d65a5a6d61a976daf311fec63171df49ecb37 (patch)
treea7ef0ea2fdb19e41edd2279a73269435ce8db740 /docs
parenta01c5e6e1d1a1d770d431702882de49faa586075 (diff)
downloadpasslib-7a0d65a5a6d61a976daf311fec63171df49ecb37.tar.gz
added support for the new Django 1.4 hash formats
- updated salt handling of the existing django hashes, in a way which should be backwards compatible w/ django 1.0 - UTs now test Django hasher output against passlib handlers (reverse was already being done) - refactor of fuzz testing to reuse some of the methods.
Diffstat (limited to 'docs')
-rw-r--r--docs/lib/passlib.apps.rst50
1 files changed, 39 insertions, 11 deletions
diff --git a/docs/lib/passlib.apps.rst b/docs/lib/passlib.apps.rst
index a47df43..619e21f 100644
--- a/docs/lib/passlib.apps.rst
+++ b/docs/lib/passlib.apps.rst
@@ -47,20 +47,48 @@ Custom Applications
Django
======
-.. data:: django_context
+The following objects provide pre-configured :class:`!CryptContext` instances
+for handling `Django <http://www.djangoproject.com>`_
+password hashes, as used by Django's ``django.contrib.auth`` module.
+They recognize all the :doc:`builtin Django hashes <passlib.hash.django_std>`
+supported by the particular Django version.
- This object provides a pre-configured :class:`!CryptContext` instance
- for handling `Django <http://www.djangoproject.com>`_
- password hashes, as used by Django's ``django.contrib.auth`` module.
- It recognizes all the :doc:`builtin Django hashes <passlib.hash.django_std>`.
- It defaults to using the :class:`~passlib.hash.django_salted_sha1` hash.
+.. note::
+
+ These objects may not match the hashes in your database if a third-party
+ library has been used to patch Django to support alternate hash formats.
+ This includes the `django-bcrypt <http://pypi.python.org/pypi/django-bcrypt>`_
+ plugin, or Passlib's builtin :mod:`django extension <passlib.ext.django>`.
+ As well, Django 1.4 introduced a very configurable "hashers" framework,
+ and individual deployments may support additional hashes and/or
+ have other defaults.
+
+.. data:: django10_context
+
+ The object replicates the password hashing policy for Django 1.0-1.3.
+ It supports all the Django 1.0 hashes, and defaults to
+ :class:`~passlib.hash.django_salted_sha1`.
+
+ .. versionadded:: 1.6
+
+.. data:: django14_context
+
+ The object replicates the stock password hashing policy for Django 1.4.
+ It supports all the Django 1.0 & 1.4 hashes, and defaults to
+ :class:`~passlib.hash.django_pbkdf2_sha256`. It treats all
+ Django 1.0 hashes as deprecated.
+
+ .. versionadded:: 1.6
+
+.. data:: django_context
- .. note::
+ This alias will always point to the latest preconfigured Django
+ context supported by Passlib, and as such should support
+ all historical hashes built into Django.
- This object may not match the hashes in your database if a third-party
- library has been used to patch Django to support alternate hash formats.
- This includes the `django-bcrypt <http://pypi.python.org/pypi/django-bcrypt>`_
- plugin, or Passlib's builtin :mod:`django extension <passlib.ext.django>`.
+ .. versionchanged:: 1.6
+ This previously was an alias for :data:`django10_context`,
+ and now points to :data:`django14_context`.
.. _ldap-contexts: