4 require_once
'Services/Password/interfaces/interface.ilPasswordEncoder.php';
30 $known_string .= chr(0);
31 $user_string .= chr(0);
33 $known_string_length = strlen($known_string);
34 $user_string_length = strlen($user_string);
37 $result = $known_string_length - $user_string_length;
41 for($i = 0; $i < $user_string_length; $i++)
46 $result |= (ord($known_string[$i % $known_string_length]) ^ ord($user_string[$i]));
60 return strlen($password) > self::MAX_PASSWORD_LENGTH;
comparePasswords($known_string, $user_string)
Compares two passwords.
const MAX_PASSWORD_LENGTH
isPasswordTooLong($password)
Checks if the password is too long.