Namespace: passwordStrength

wp. passwordStrength

Contains functions to determine the password strength.
Since:
  • 3.7.0
Source:

Methods


<static> meter(password1, blacklist, password2)

Determines the strength of a given password. Compares first password to the password confirmation.
Parameters:
Name Type Description
password1 string The subject password.
blacklist Array An array of words that will lower the entropy of the password.
password2 string The password confirmation.
Since:
  • 3.7.0
Source:
Returns:
The password strength score.
Type
number

<static> userInputBlacklist()

Builds an array of words that should be penalized. Certain words need to be penalized because it would lower the entropy of a password if they were used. The blacklist is based on user input fields such as username, first name, email etc.
Since:
  • 3.7.0
Source:
Returns:
The array of words to be blacklisted.
Type
Array:.<string:>