get_hasher
Return an instance of a loaded password hasher.
If algorithm is 'default', return the default hasher. Lazily import hashers specified in the project's settings file if needed.
def get_hasher(
algorithm: string = default
) - > BasePasswordHasher
Return an instance of a loaded password hasher. If algorithm is 'default', return the default hasher. Lazily import hashers specified in the project's settings file if needed.
Parameters
| Name | Type | Description |
|---|---|---|
| algorithm | string = default | The identifier of the hashing algorithm to retrieve, or 'default' to fetch the primary hasher defined in settings |
Returns
| Type | Description |
|---|---|
BasePasswordHasher | An instance of the requested password hasher class used for password verification or hashing |