verify_password
Return two booleans. The first is whether the raw password matches the three part encoded digest, and the second whether to regenerate the password.
def verify_password(
password: string,
encoded: string,
preferred: string = "default"
) - > tuple
Return two booleans. The first is whether the raw password matches the three part encoded digest, and the second whether to regenerate the password.
Parameters
| Name | Type | Description |
|---|---|---|
| password | string | The raw, plain-text password string to be verified. |
| encoded | string | The hashed password string against which the raw password will be compared. |
| preferred | string = "default" | The identifier of the hashing algorithm that should be used for new or updated passwords. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing two booleans: (is_correct, must_update). The first indicates if the password matches the digest; the second indicates if the password should be re-hashed using the preferred hasher or updated settings. |