GithubHelp home page GithubHelp logo

pombredanne / django-bcrypt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dwaiter/django-bcrypt

1.0 0.0 0.0 650 KB

A git mirror of django-bcrypt.

Home Page: http://bitbucket.org/dwaiter/django-bcrypt/

License: MIT License

django-bcrypt's Introduction

django-bcrypt

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 configure how django-bcrypt behaves with a few settings in your settings.py file.

BCRYPT_ENABLED

Enables bcrypt hashing when User.set_password() is called.

Default: True

BCRYPT_ENABLED_UNDER_TEST

Enables bcrypt hashing when running inside Django TestCases.

Default: False (to speed up user creation)

BCRYPT_ROUNDS

Number of rounds to use for bcrypt hashing. Increase this as computers get faster.

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.

Default: 12

BCRYPT_MIGRATE

Enables bcrypt password migration on a check_password() call.

The hash is also migrated when BCRYPT_ROUNDS changes.

Default: False

Acknowledgements

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

It also depends on the py-bcrypt library.

django-bcrypt's People

Contributors

calinf avatar gurglet avatar martey avatar severb avatar sfllaw avatar sjl avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.