Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions django/contrib/auth/hashers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ async def acheck_password(password, encoded, setter=None, preferred="default"):


def make_password(password, salt=None, hasher="default"):
"""
Turn a plain-text password into a hash for database storage
"""Turn a plaintext password into a hash for database storage.

Same as encode() but generate a new random salt. If password is None then
return a concatenation of UNUSABLE_PASSWORD_PREFIX and a random string,
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/auth/passwords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ from the ``User`` model.

*Asynchronous version*: ``acheck_password()``

If you'd like to manually authenticate a user by comparing a plain-text
If you'd like to manually authenticate a user by comparing a plaintext
password to the hashed password in the database, use the convenience
function :func:`check_password`. It takes two mandatory arguments: the
plain-text password to check, and the full value of a user's ``password``
plaintext password to check, and the full value of a user's ``password``
field in the database to check against. It returns ``True`` if they match,
``False`` otherwise. Optionally, you can pass a callable ``setter`` that
takes the password and will be called when you need to regenerate it. You
Expand All @@ -502,7 +502,7 @@ from the ``User`` model.
.. function:: make_password(password, salt=None, hasher='default')

Creates a hashed password in the format used by this application. It takes
one mandatory argument: the password in plain-text (string or bytes).
one mandatory argument: the plaintext password (string or bytes).
Optionally, you can provide a salt and a hashing algorithm to use, if you
don't want to use the defaults (first entry of ``PASSWORD_HASHERS``
setting). See :ref:`auth-included-hashers` for the algorithm name of each
Expand Down
Loading