Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Util\Password Class Reference
Collaboration diagram for Galette\Util\Password:

Public Member Functions

 __construct (Preferences $prefs)
 
 isValid (string $password)
 
 isBlacklisted (string $password)
 
 calculateStrength (string $password)
 
 getStrenght ()
 
 getErrors ()
 
 getStrenghtErrors ()
 
 getBlacklistedPasswords ()
 
 addPersonalInformation (array $infos)
 
 setAdherent (Adherent $adh)
 

Protected Attributes

Preferences $preferences
 
array $errors = []
 
array $strength_errors = []
 
int $strength = null
 
bool $blacklisted = false
 
array $personal_infos = []
 

Detailed Description

Password checks

Author
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Util\Password::__construct ( Preferences  $prefs)

Default constructor

Parameters
Preferences$prefsPreferences instance

Member Function Documentation

◆ addPersonalInformation()

Galette\Util\Password::addPersonalInformation ( array  $infos)

Add personal information to check against

Parameters
array<int,string>$infos Personal information
Returns
array<int, string>

◆ calculateStrength()

Galette\Util\Password::calculateStrength ( string  $password)

Calculate password strength

Parameters
string$passwordPassword to check
Returns
integer

◆ getBlacklistedPasswords()

Galette\Util\Password::getBlacklistedPasswords ( )

Build password blacklist

Returns
array<int, string>

◆ getErrors()

Galette\Util\Password::getErrors ( )

Get errors

Returns
array<int, string>

◆ getStrenght()

Galette\Util\Password::getStrenght ( )

Get current strength

Returns
integer

◆ getStrenghtErrors()

Galette\Util\Password::getStrenghtErrors ( )

Get strength errors

Returns
array<int, string>

◆ isBlacklisted()

Galette\Util\Password::isBlacklisted ( string  $password)

Is password blacklisted?

Parameters
string$passwordPassword to check
Returns
boolean

◆ isValid()

Galette\Util\Password::isValid ( string  $password)

Does password suits requirements?

Parameters
string$passwordPassword to test
Returns
boolean

◆ setAdherent()

Galette\Util\Password::setAdherent ( Adherent  $adh)

Set member and calculate personal information to blacklist

Parameters
Adherent$adhAdherent instance
Returns
self

The documentation for this class was generated from the following file: