code: private static String encodePasswordCookie(String username, String password) {
  		StringBuffer buf = new StringBuffer();
  		if (username != null && password != null) {
  			byte[] bytes = (username + ENCODE_DELIMETER + password).getBytes();
  			int b;
  
  			for (int n = 0; n < bytes.length; n++) {
  				b = bytes[n] ^ (ENCODE_XORMASK + n);
  				buf.append((char) (ENCODE_CHAR_OFFSET1 + (b & 0x0F)));
  				buf.append((char) (ENCODE_CHAR_OFFSET2 + ((b >> 4) & 0x0F)));
  			}
  		}
  		return buf.toString();
  	}
docs: Builds a cookie string containing a username and password.
  <p>
  
  Note: with open source this is not really secure, but it prevents users
  from snooping the cookie file of others and by changing the XOR mask and
  character offsets, you can easily tweak results.
  
  @param username
  The username.
  @param password
  The password.
  @return String encoding the input parameters, an empty string if one of
  the arguments equals <code>null</code>.