must_update_salt
Determines if a salt needs updating by calculating its current entropy based on length and character set, then comparing it against a required entropy threshold.
def must_update_salt(
salt: string,
expected_entropy: float
) - > boolean
Determines if the current salt provides insufficient entropy based on a required threshold.
Parameters
| Name | Type | Description |
|---|---|---|
| salt | string | The existing salt string whose entropy is being evaluated. |
| expected_entropy | float | The minimum required bits of entropy the salt must satisfy. |
Returns
| Type | Description |
|---|---|
boolean | True if the calculated entropy of the salt is less than the expected entropy, indicating an update is necessary. |