+
+ /**
+ * Generate a cookie.
+ *
+ * @param who
+ * the user name (can be NULL)
+ * @param key
+ * the password (can be NULL)
+ * @param subkey
+ * a subkey (can be NULL)
+ * @param option
+ * an option linked to the login (can be NULL)
+ *
+ * @return a fresh cookie
+ */
+ private String generateCookie(String who, String key, String subkey,
+ String option) {
+ String wookie = CookieUtils.generateCookie(who + key, 0);
+ return wookie + "~"
+ + CookieUtils.generateCookie(
+ wookie + (subkey == null ? "" : subkey) + option, 0)
+ + "~" + option;
+ }