Dummy (plain text) password hashing for Django.
Project description
Dummy (plain text) password hashing for Django… for use in tests!
Speed up tests!
Cryptography is greedy. When you run tests, you usually do not care about password security, but you care about performances. Using dummy password hashing speeds up tests!
Install django-plainpasswordhasher with your favorite installer. Here is an example using pip:
pip install django-plainpasswordhasher
Then configure your test settings:
PASSWORD_HASHERS = ('django_plainpasswordhasher.PlainPasswordHasher', )
Except explicit password hashing tests
In most cases, using a dummy password hasher will do the job. But you may write some tests that require real password hashing. In such a case, let’s override settings!
from django.conf import global_settings # Django default settings...
# You may use your project's
# default settings instead.
from django.test import TestCase
from django.test.utils import override_settings
@override_settings(PASSWORD_HASHERS=global_settings.PASSWORD_HASHERS)
class CryptographyTestCase(TestCase):
"""Tests that require real cryptography."""
Resources
PyPI page: https://pypi-hypernode.com/pypi/django-plainpasswordhasher
Code repository: https://github.com/novapost/django-plainpasswordhasher
Bugtracker: https://github.com/novapost/django-plainpasswordhasher/issues
Continuous integration: https://travis-ci.org/novapost/django-plainpasswordhasher
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-plainpasswordhasher-0.2.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | f602295720c65d7fd9d877a97f2460411ffd981764d293501634801cc22fcdb3 |
|
MD5 | 4c57c2c2f94d424364b1f4c04adffaa4 |
|
BLAKE2b-256 | 43646770732dabb5b12ee9efc78229501865e241aad255e4604ee1fe3caa054f |