Skip to main content

Make Django use bcrypt for hashing passwords.

Project description

You should be using bcrypt.

django-bcrypt makes it easy to use bcrypt to hash passwords with Django.

Installation and Usage

Install the package with pip and Mercurial or git:

pip install -e hg+http://bitbucket.org/dwaiter/django-bcrypt#egg=django-bcrypt

# or ...

pip install -e git://github.com/dwaiter/django-bcrypt.git#egg=django-bcrypt

Add django_bcrypt to your INSTALLED_APPS.

That’s it.

Any new passwords set will be hashed with bcrypt. Old passwords will still work fine.

Configuration

You can set BCRYPT_ROUNDS in settings.py to change the number of rounds django-bcrypt uses. The default is 12.

You can change the number of rounds without breaking already-hashed passwords. New passwords will use the new number of rounds, and old ones will use the old number.

Acknowledgements

This is pretty much a packaged-up version of this blog post for easier use.

It also depends on the py-bcrypt library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-bcrypt-0.9.2.tar.gz (4.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page