Django management commands for changing users' hashed passwords.
Project description
django-hashedpass
Django management commands for changing users' hashed passwords.
Installation
Requirements: Django >= 2.2, Python >= 3.5.
Install:
$ pip install django-hashedpass
Then, edit your Django project's settings.py
file:
INSTALLED_APPS = [
# ...
'django_hashedpass', # NOTE: underscore (_), not dash (-).
# ...
]
Usage
-
changehashedpass
- Change a user's hashed password.$ python3 manage.py changehashedpass 'admin' 'pbkdf2_sha256$150000$yAhqE5ZDGEii$lD5JUoCuz6qRA+BVlvetFPGyGMwLmYl0rCc3awcNYLo=' Successfully changed the hashed password for "admin".
-
genhashedpass
- Generate a hashed password from a plaintext password.$ python3 manage.py genhashedpass Password: Password (again): pbkdf2_sha256$150000$ZOTZr0AKGQyW$y6+Bdqwn9UsP/riDoEaMQ9Q17Sw8zZoH1jxmlgy94oA=
$ python3 manage.py genhashedpass --password '123456' pbkdf2_sha256$150000$AnoGZfdqz6pW$GUGUJR5CggZA4e4JUMdtN8GU1CejLYTKs3PIdOnbF4k=
Development
To run unit tests: python3 ./run_tests.py
.
Tested on Django 2.22, Python 3.6.8, Ubuntu 18.04.
Project started on: 2019-07-21
License
This project is distributed under the BSD 3-Clause License (see LICENSE).
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
Built Distribution
File details
Details for the file django-hashedpass-0.1.0.tar.gz
.
File metadata
- Download URL: django-hashedpass-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c9928ed8da45765231ed285e1a00966d47b82c38faf9253a0091f5c377763f |
|
MD5 | 43391dc90d58811d3209cd7abca714a5 |
|
BLAKE2b-256 | 1f4fd7f0223cccf02e38f271110a1be9fcf738a71ad633b5a84214892a63cd73 |
File details
Details for the file django_hashedpass-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_hashedpass-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100d955cb6c29a8c396fa0ad537eb43e6fe75d8919d20066c3318c74de4f391e |
|
MD5 | 41b35307cf992869d41cdcd9862ac55f |
|
BLAKE2b-256 | 3008b66175a2a7e03b63ac86ab748c395a3a1fed832f43372788b57f74cb9875 |