Checks whether the passwords match.<p>

@param password2 the password 2 value
341003
void checkPasswordMatch(String password2) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(password2)) {
            showPasswordMatchError(!password2.equals(m_form.getPassword1()));
        }
    }
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;
        }
    }
1037659
private boolean isValid()
    {
        StringBuilder builder = new StringBuilder();
        for (Match match : matches)
        {
            builder.append(match.getToken());
        }

        return password.equals(builder.toString());
    }
1195586
public void setUserPassword(String password) {
		try {
			getSipURI().setUserPassword(password);
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
			throw new IllegalArgumentException("Bad arg", e	);
		}
	}
1329909
public char match(String str1, String str2) {
        invocationCount++;
        char rel = IMappingElement.IDK;

        if (str1 == null || str2 == null) {
            rel = IMappingElement.IDK;
        } else {
            if ((str1.length() > 3) && (str2.length() > 3)) {
                if (str1.startsWith(str2)) {
                    if (str1.contains(" ")) {
                        rel = IMappingElement.LESS_GENERAL;
                    } else {
                        rel = IMappingElement.EQUIVALENCE;
                    }
                } else {
                    if (str2.startsWith(str1)) {
                        if (str2.contains(" ")) {
                            rel = IMappingElement.MORE_GENERAL;
                        } else {
                            rel = IMappingElement.EQUIVALENCE;
                        }
                    }
                }
            }//if ((str1.length() > 3) && (str2.length() > 3)) {
        }

        if (rel != IMappingElement.IDK) {
            relCount++;
            addCase(str1, str2, rel);
        }
        return rel;
    }
1261245
public void setPassword(CharSequence password) {

        LettuceAssert.notNull(password, "Password must not be null");
        this.password = password.toString().toCharArray();
    }
629084
private boolean matchModes(QName m1, QName m2)
  {
    return (((null == m1) && (null == m2))
            || ((null != m1) && (null != m2) && m1.equals(m2)));
  }
409333
private static ArrayList<DateMatch> matchDatesWithSeparator(Configuration configuration, String password)
    {

        // Initialize the list of matching dates
        ArrayList<DateMatch> dateMatches = new ArrayList<>();

        // Create all possible subsequences of the password
        for (int start = 0; start < password.length(); start++)
        {
            for (int end = start + 6; end <= password.length(); end++)
            {

                // Get the subsequence
                String passwordChunk = password.substring(start, end);

                // Extract the date (if there is one) with the year as prefix
                Matcher m1 = DATE_WITH_SEPARATOR_YEAR_SUFFIX.matcher(passwordChunk);
                if (m1.matches())
                {
                    ValidDateSplit split = isDateValid(m1.group(1), m1.group(3), m1.group(4));
                    if (split != null)
                    {
                        dateMatches.add(new DateMatch(passwordChunk, configuration, split.date, split.month, split.year, m1.group(2), start, end - 1));
                    }
                }

                // Extract the date (if there is one) with the year as suffix
                Matcher m2 = DATE_WITH_SEPARATOR_YEAR_PREFIX.matcher(passwordChunk);
                if (m2.matches())
                {
                    ValidDateSplit split = isDateValid(m2.group(4), m2.group(3), m2.group(1));
                    if (split != null)
                    {
                        dateMatches.add(new DateMatch(passwordChunk, configuration, split.date, split.month, split.year, m2.group(2), start, end - 1));
                    }
                }

            }
        }

        return dateMatches;

    }
184958
private static boolean isEqual(String string1, String string2) {
        return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2));
    }
500511
public void setPassword(String value) {

        try {
            OpenCms.getPasswordHandler().validatePassword(value);
        } catch (CmsSecurityException e) {
            throw new CmsIllegalArgumentException(e.getMessageContainer());
        }
        m_password = value;
    }
995256
private function checkModePbkdf2($password, $hash)
    {
        $this->cwsDebug->titleH2('Check password hash in PBKDF2 mode');
        $this->cwsDebug->labelValue('Password', $password);
        $this->cwsDebug->dump('Hash', $hash);

        $params = explode(self::PBKDF2_SEPARATOR, $hash);
        if (count($params) < self::PBKDF2_SECTIONS) {
            return false;
        }

        $algorithm = $params[self::PBKDF2_ALGORITHM_INDEX];
        $salt = $params[self::PBKDF2_SALT_INDEX];
        $ite = $params[self::PBKDF2_ITE_INDEX];
        $hash = base64_decode($params[self::PBKDF2_HASH_INDEX]);
        $this->cwsDebug->labelValue('Decoded hash', $hash);

        $checkHash = $this->getPbkdf2($algorithm, $password, $salt, $ite, strlen($hash), true);
        $this->cwsDebug->labelValue('Check hash', $checkHash);

        $result = $this->slowEquals($hash, $checkHash);
        $this->cwsDebug->labelValue('Valid?', ($result ? 'YES!' : 'NO...'));

        return $result;
    }
721250
def clean_new_password2(self):
        """"""
        password1 = self.cleaned_data.get('new_password1')
        password2 = self.cleaned_data.get('new_password2')

        try:
            directory = APPLICATION.default_account_store_mapping.account_store
            directory.password_policy.strength.validate_password(password2)
        except ValueError as e:
            raise forms.ValidationError(str(e))

        if password1 and password2:
            if password1 != password2:
                raise forms.ValidationError("The two passwords didn't match.")

        return password2
1321524
def double_prompt_for_plaintext_password():
    """"""
    password = 1
    password_repeat = 2
    while password != password_repeat:
        password = getpass.getpass('Enter password: ')
        password_repeat = getpass.getpass('Repeat password: ')
        if password != password_repeat:
            sys.stderr.write('Passwords do not match, try again.\n')
    return password
1077493
public void setPasswordHandler(I_CmsPasswordHandler passwordHandler) {

        m_passwordHandler = passwordHandler;
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_PWD_HANDLER_SUCCESS_1,
                    passwordHandler.getClass().getName()));
        }
    }
292760
private boolean doUserPasswordAuthentication(Socket s,
                                                InputStream in,
                                                OutputStream out) 
                                                throws IOException{
     int version = in.read();
     if(version != 1) return false;
     int ulen = in.read();
     if(ulen < 0) return false;
     byte[] user = new byte[ulen];
     in.read(user);
     int plen = in.read();
     if(plen < 0) return false;
     byte[] password = new byte[plen];
     in.read(password);

     if(validator.isUserValid(new String(user), new String(password),s)){
       //System.out.println("user valid");
       out.write(new byte[]{1,0});
     }else{
       //System.out.println("user invalid");
       out.write(new byte[]{1,1});
       return false;
     }

     return true;
   }
33679
public final void clearPassword() {
        if (password != null) {
            for (int i = 0; i < password.length; i++) {
                password[i] = ' ';
            }
            password = null;
        }
    }
373125
public boolean validate(String userPassword, String passwordToBeValidate) {

        String data = SignUtils.createPassword(passwordToBeValidate);

        if (data.equals(userPassword)) {
            return true;
        } else {
            return false;
        }
    }