check_password
Return a boolean of whether the raw password matches the three part encoded digest.
If setter is specified, it'll be called when you need to regenerate the
password.
def check_password(
password: string,
encoded: string,
setter: callable = null,
preferred: string = "default"
) - > boolean
Return a boolean of whether the raw password matches the three part encoded digest. If setter is specified, it'll be called when you need to regenerate the password.
Parameters
| Name | Type | Description |
|---|---|---|
| password | string | The raw, unencrypted password string to be verified |
| encoded | string | The three-part encoded digest string to compare against |
| setter | callable = null | An optional callback function invoked with the raw password to update the stored hash if the current encoding is deprecated |
| preferred | string = "default" | The preferred hashing algorithm or configuration to check against for potential re-encoding |
Returns
| Type | Description |
|---|---|
boolean | True if the raw password matches the encoded digest, False otherwise |