Match spatial patterns based on keyboard layouts (e.g. qwerty, dvorak, keypad).

@copydoc Match::match()

@param       $password
@param array $userInputs

@return array
964136
public static function match($password, array $userInputs = [])
    {
        $matches = [];
        $graphs = static::getAdjacencyGraphs();
        foreach ($graphs as $name => $graph) {
            $results = static::graphMatch($password, $graph);
            foreach ($results as $result) {
                $result['graph'] = $name;
                $matches[] = new static($password, $result['begin'], $result['end'], $result['token'], $result);
            }
        }

        return $matches;
    }
775494
public function matchingListeners($eventKeyPattern)
    {
        $matchPattern = '/' . preg_quote($eventKeyPattern, '/') . '/';
        $matches = array_intersect_key(
            $this->_listeners,
            array_flip(
                preg_grep($matchPattern, array_keys($this->_listeners), 0)
            )
        );

        return $matches;
    }
106695
private function findMatchingToken($input)
    {
        // Check with all tokenDefinitions
        foreach ($this->tokenDefinitions as $tokenDefinition) {
            $token = $tokenDefinition->match($input);

            // Return the first token that was matched.
            if ($token) {
                return $token;
            }
        }

        // Return null if no tokens were matched.

        return null;
    }
131374
public static final boolean passwordMatches(User u) {
		if (u == null) {
			return false;
		}
		String password = u.getPassword();
		String identifier = u.getIdentifier();
		if (StringUtils.isBlank(password) || StringUtils.isBlank(identifier)) {
			return false;
		}
		ParaObject s = CoreUtils.getInstance().getDao().read(u.getAppid(), identifier);
		if (s != null) {
			if (s instanceof Sysprop) {
				String storedHash = (String) ((Sysprop) s).getProperty(Config._PASSWORD);
				return Utils.bcryptMatches(password, storedHash);
			} else {
				LoggerFactory.getLogger(User.class).
						warn(Utils.formatMessage("Failed to read auth object for user '{}' using identifier '{}'.",
								u.getId(), identifier));
			}
		}
		return false;
	}
1167054
protected function verifyUser($user, $password)
    {
        if (!isset($this->userList[$user]))
        {
            return false;
        }
        if ($this->userList[$user] != $password)
        {
            return false;
        }
        return true;
    }
761506
public function checkUserCredentials($username, $password)
    {
        if ($user = $this->getUser($username)) {
            return $this->checkPassword($user, $password);
        }

        return false;
    }
514843
public function match($input, $key, $match, $lang)
    {
        $lang = $this->custom('match', $lang);
        if ($input[$key] !== $input[$match]) {
            return preg_replace_callback('/(\:field)(.*)(\:match)/i',
            function ($m) use ($key, $match) {
                return $key.$m[2].$match;
            }, $lang);
        }
    }
593607
private function MatchFuncs($toks){

		if( $this->pos < $this->input_len ){
			foreach($toks as $tok){
				$match = $this->$tok();
				if( $match ){
					return $match;
				}
			}
		}

	}
262021
public function matches($component)
    {
        $parts = explode('.', $component, 2);

        $key = $parts[0];
        $value = isset($parts[1]) ? $parts[1] : null;

        return $this->doesKeyOrValueMatch($key, $value);
    }
783616
private function containsAtLeastOneUpperCaseCharacter(string $password): bool
    {
        if ($this->constraints['requireAtLeastOneUpperCaseCharacter']) {
            return (bool)preg_match(self::AT_LEAST_ONE_UPPER_CASE_CHARACTER_REGEX, $password);
        }

        return true;
    }
1176115
public static function match($password, array $userInputs = [])
    {
        $matches = [];
        $dates = static::datesWithoutSeparators($password) + static::datesWithSeparators($password);
        foreach ($dates as $date) {
            $matches[] = new static($password, $date['begin'], $date['end'], $date['token'], $date);
        }

        return $matches;
    }
577881
public function encodePassword(UserInterface $user, $password)
    {
        return $this['security.encoder_factory']->getEncoder($user)->encodePassword($password, $user->getSalt());
    }
741379
public static function validateUser(ContainerInterface $container, string $userName, string $password)
    {
        /** @var Connection $connection */
        $connection = $container->get(Connection::class);

        $query = $connection->createQueryBuilder();
        $query
            ->select([User::FIELD_ID, User::FIELD_EMAIL, User::FIELD_PASSWORD_HASH])
            ->from(User::TABLE_NAME)
            ->where(User::FIELD_EMAIL . '=' . $query->createPositionalParameter($userName))
            ->setMaxResults(1);
        $user = $query->execute()->fetch(PDO::FETCH_ASSOC);
        if ($user === false) {
            return null;
        }

        /** @var HasherInterface $hasher */
        $hasher = $container->get(HasherInterface::class);
        if ($hasher->verify($password, $user[User::FIELD_PASSWORD_HASH]) === false) {
            return null;
        }

        return (int)$user[User::FIELD_ID];
    }
362222
public function checkCredentials($credentials, UserInterface $user)
    {
        return $this->userPasswordEncoderFactory->isPasswordValid($user, $credentials->getPassword());
    }
1257308
public function match($string, array &$matches = null)
    {
        return $this->filter === false || (\preg_match($this->pattern, $string, $matches) xor $this->invert);
    }
765620
public function withUserInfo($user, $password = null){
        if(!is_string($user)){
            throw new \InvalidArgumentException();
        }

        if(null !== $password && !is_string($password)){
            throw new \InvalidArgumentException();
        }

        $password   = "" === $password ? null : $password;

        if("" !== $user && 1 !== preg_match(static::REGEX_USERINFO_USER, $user)){
            throw new \InvalidArgumentException();
        }

        if(null !== $password && 1 !== preg_match(static::REGEX_USERINFO_PASS, $password)){
            throw new \InvalidArgumentException();
        }

        $userinfo   = ("" === $user || null === $password)
            ? $user
            : $user . ":" . $password
        ;

        if($this->userinfo == $userinfo){
            return $this;
        }

        $clone              = clone $this;
        $clone->userinfo    = $userinfo;

        return $clone;
    }
1224181
public function validateCredentials(UserInterface $user, array $credentials)
    {
        $plain = $credentials['password'];

        return $this->hasher->check($plain, $user->getAuthPassword());
    }