SproutCMS

This is the code documentation for the SproutCMS project

function passwordComplexity()

Check the given password meets complexity requirements

Usage

array Security::passwordComplexity ( string $str , int $length , int $classes , bool $bad_list );

Arguments

  1. string $str
    String to check
  2. int $length
    Minimum length in bytes
  3. int $classes
    Minumum number of "character classes", so 2 would accept 'passWORD' but not 'password'
  4. bool $bad_list
    SHould the password be checked against the "bad list" of most common passwords

Return value

  • array
    Errors, may be an empty array