Kelvin Wong avatar Kelvin Wong committed bf3b169

Added some docstrings

Comments (0)

Files changed (4)

         ``scrypt$salt$14$8$1$64$Base64Hash==``
 
 The good news is that 14 is three characters shorter than 16384. The bad news
-is that this introduces a backward incompatible change as of version 0.2.0.
+is that this introduces a backwards incompatible change as of version 0.2.0.
 
 If you see your application generating *HTTP 500 Server Errors* with a 
 *scrypt.error: 'hash parameters are wrong (r*p should be < 2**30, and N should

django_scrypt/__init__.py

+"""A Scrypt-enabled password hasher for Django 1.4
+
+Django-Scrypt provides a Scrypt-enabled hashing class compatible
+with Django's flexible password storage system
+
+Modules
+
+hashers - Class used for creating Scrypt message digests
+
+Classes
+
+hashers.ScryptPasswordHasher - Scrypt hashing for Django 1.4
+
+Typical Usage
+
+Place the full name of the ScryptPasswordHasher at the very top
+of the PASSWORD_HASHERS tuple in your project settings file. As
+users login they will update their passwords to use Scrypt hashes.
+
+In settings.py:
+
+PASSWORD_HASHERS = (
+'django_scrypt.hashers.ScryptPasswordHasher',
+'django.contrib.auth.hashers.PBKDF2PasswordHasher',
+'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
+'django.contrib.auth.hashers.SHA1PasswordHasher',
+'django.contrib.auth.hashers.MD5PasswordHasher',
+'django.contrib.auth.hashers.CryptPasswordHasher',
+)
+"""
+__version__ = '0.2.1'
+__all__ = ['hashers']

django_scrypt/hashers.py

+"""Contains the class used to create and store Scrypt message digests
+"""
 from django.contrib.auth.hashers import BasePasswordHasher, mask_hash
 from django.utils.datastructures import SortedDict
 from django.utils.crypto import constant_time_compare
 import sys
 from distutils.core import setup, Command
 
+from django_scrypt import __version__
+
 cmdclasses = dict()
 README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                            'README.rst')
 cmdclasses['test'] = Tester
 
 setup(name='django-scrypt',
-      version='0.2.1',
+      version=__version__,
       description='A Scrypt-enabled password hasher for Django 1.4',
       long_description=long_description,
       author='Kelvin Wong',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.