Validates that password is different than all previous passwords

@return bool
335355
private function validateDifferentPreviousAll(): bool
    {
        if ($this->options['require-different-than-previous-all'] === true) {
            $passwordHash = (string)$this->value;
            foreach ($this->options['stored-passwords'] as $storedPassword) {
                if (PasswordEnctyption::compare($passwordHash, $storedPassword)) {
                    $this->setError(self::VALIDATOR_ERROR_PASSWORD_MUST_BE_DIFFERENT_THAN_PREVIOUS_ALL);
                    return false;
                }
            }
        }
        return true;
    }
755688
protected boolean isPasswordValid() {

        if ((m_pw.getPassword1() == null) | (m_pw.getPassword2() == null)) {
            return false;
        }
        try {
            CmsPasswordInfo pwdInfo = new CmsPasswordInfo();
            pwdInfo.setNewPwd(m_pw.getPassword1());
            pwdInfo.setConfirmation(m_pw.getPassword2());

            pwdInfo.validate();
            return true;
        } catch (CmsIllegalArgumentException | CmsIllegalStateException e) {
            LOG.error("New password is not ok", e);
            return false;
        }
    }
470506
public function resetPassword()
    {
        if ($this->validate() && ($user = $this->getUser()) != null) {
            $user->resetPassword($this->password);
            return true;
        }
        return false;
    }
1216936
public function isValid()
  {
    return ($this->checkUser() && $this->checkPass() && $this->checkHost() && $this->checkPort() && $this->checkPath() && $this->checkQuery() && $this->checkFragment());
  }
1143931
public static function validate($password, $hash): bool
    {
        return Yii::$app->security->validatePassword($password, $hash);
    }
6257
public function isValid()
    {
        $blnReturn = true;

        $intDynamicCount = $this->getDynamicCount();

        for ($intCount = 0; $intCount <= $intDynamicCount; $intCount ++) {
            $blnReturn = $this->__validate($intCount);

            if (! $blnReturn) {
                break;
            }
        }

        return $blnReturn;
    }
383438
public function validateAllowEmpty()
    {
        $val = $this->val();

        if (($val === null || $val === '') && !$this->allowEmpty()) {
            return false;
        } else {
            return true;
        }
    }
1365260
public function validatePassword()
    {
        $user = User::findByEmail($this->email);
        if (!$user) {
            $user = Yii::$app->collectors['identityProviders']->attemptCreate($this->email, $this->password);
        }
        if (!$user || !$user->validatePassword($this->password)) {
            $this->addError('password', 'Incorrect username or password.');
        }
    }
860849
private function validateEquals(): bool
    {
        $isValid = \mb_strlen((string)$this->value, 'UTF-8') == $this->options['length'] ? true : false;
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_STRING_LENGTH_NOT_MATCH);
        }
        return $isValid;
    }
520325
protected function validateUserLogin()
    {
        $this->setSubmitted('user', null, false);
        $this->filterSubmitted(array('email', 'password'));
        $this->validateComponent('user_login');

        return !$this->hasErrors();
    }
196185
protected function isValidLoginRequest()
    {
        $check_hash = $this->queryParameters->get('hash');

        // Get sorted array of values
        $check = $this->queryParameters
            ->except('hash')
            ->map(function ($value, $key) {
                return $key.'='.$value;
            })
            ->values()
            ->sort();
        $check_string = implode("\n", $check->toArray());

        $secret = hash('sha256', $this->config->get('token'), true);
        $hash = hash_hmac('sha256', $check_string, $secret);

        if (strcmp($hash, $check_hash) !== 0) {
            return false;
        }
        if ((time() - $this->queryParameters->get('auth_date')) > 86400) {
            return false;
        }

        return true;
    }
34197
public function encodePassword()
    {
        if (!$this->validate(['password'])) {
            return false;
        }
        
        // create random string for password salting
        $this->password_salt = Yii::$app->getSecurity()->generateRandomString();
        // store the password
        $this->password = Yii::$app->getSecurity()->generatePasswordHash($this->password.$this->password_salt);

        return true;
    }
87320
public function comparePasswords($password)
    {
        $passwordSalted = $this->saltPassword($password);
        if (password_verify($passwordSalted, $this->privateKey)) {
            return true;
        }
        
        return false;
    }
656059
protected function validateKeyCredential()
    {
        if (!$this->isPosted('save')) {
            return false;
        }

        $this->setSubmitted('credential');
        $this->validateElement(array('name' => $this->text('Name')), 'length', array(1, 255));
        $this->validateElement(array('data.key' => $this->text('Key')), 'length', array(1, 255));

        return !$this->hasErrors();
    }
438608
public function validatePassword()
    {
        // If the user is banned, inactive, or has a pending invitation, abort
        if ($this->_user->status == Users::BANNED || $this->_user->status == Users::INACTIVE || $this->_user->status == Users::PENDING_INVITATION)
            $this->errorCode = self::ERROR_UNKNOWN_IDENTITY;
        else if (!$this->password_verify_with_rehash($this->password, $this->_user->password))
            $this->errorCode = YII_DEBUG ? self::ERROR_PASSWORD_INVALID : self::ERROR_UNKNOWN_IDENTITY;

        if ($this->errorCode === 100 || $this->errorCode === NULL || $this->errorCode === self::REQUIRE_TWO_FACTOR_AUTH)
            return true;

        return false;
    }
1279584
public function verify($password): bool {
        if ($password instanceof StringClass || $password instanceof PasswordClass) {
            return password_verify($password->getValue(), $this->getValue());
        }
        return password_verify($password, $this->getValue());
    }
1037659
private boolean isValid()
    {
        StringBuilder builder = new StringBuilder();
        for (Match match : matches)
        {
            builder.append(match.getToken());
        }

        return password.equals(builder.toString());
    }