public boolean processMsg(CConnection cc) {
    InStream is = cc.getInStream();
    OutStream os = cc.getOutStream();

    // Read the challenge & obtain the user's password
    byte[] challenge = new byte[VNC_AUTH_CHALLENGE_SIZE];
    is.readBytes(challenge, 0, VNC_AUTH_CHALLENGE_SIZE);
    // JW: Launcher passes in password as property of Options object,
    // so there's no need to pop up a dialog asking for a username
    // and password, if they are already recorded within the Options object.
    StringBuffer passwd = new StringBuffer();
    // Cast cc object as CConn, so we access to opts
    CConn cconn = (CConn) cc;
    if (cconn.opts.password==null || cconn.opts.password.equals(""))
      CConn.upg.getUserPasswd(null, passwd);
    else
      passwd.append(cconn.opts.password);

    // Calculate the correct response
    byte[] key = new byte[8];
    int pwdLen = passwd.length();
    byte[] utf8str = new byte[pwdLen];
    try {
      utf8str = passwd.toString().getBytes("UTF8");
    } catch(java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    for (int i = 0; i < 8; i++)
      key[i] = i < pwdLen ? utf8str[i] : 0;
    DesCipher des = new DesCipher(key);
    for (int j = 0; j < VNC_AUTH_CHALLENGE_SIZE; j += 8)
      des.encrypt(challenge, j, challenge, j);

    // Return the response to the server
    os.writeBytes(challenge, 0, VNC_AUTH_CHALLENGE_SIZE);
    os.flush();
    return true;
  }