code: public final static boolean matches(String encryptedPassword, String enteredPassword) {
  	String salt = encryptedPassword.substring(0, 3);
  	String newCrypt = crypt(salt, enteredPassword);
  	return newCrypt.equals(encryptedPassword);
      }
docs: * Check that enteredPassword encrypts to * encryptedPassword.
  
  @param encryptedPassword The encryptedPassword. The first two characters are assumed to be the
  salt. This string would be the same as one found in a Unix /etc/passwd file.
  @param enteredPassword The password as entered by the user (or otherwise aquired).
  @return true if the password should be considered correct.