Skip to content

Instantly share code, notes, and snippets.

@skyl
Forked from steve-chavez/django_hasher.py
Last active February 25, 2022 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skyl/0c6430499c46129398c4b8ac0e20e9ea to your computer and use it in GitHub Desktop.
Save skyl/0c6430499c46129398c4b8ac0e20e9ea to your computer and use it in GitHub Desktop.
Use django hasher to make password
# you have to have a django project to do it this way
# You can run this in a `./manage.py shell`
from django.contrib.auth.hashers import make_password
make_password("youreverysecuresuperpass")
# this will output something that looks like this:
# 'pbkdf2_sha256$260000$rgjSFB3xwsxkfcL1iE8wq6$bDtiRY0+gtE4ahFdfDeHwy0tzLb8McDRnppS8kD8QJs='
# by default in Django 4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment