protected function generateCookieValue($username, $password)
    {
        // $username is encoded because it might contain COOKIE_DELIMITER,
        // we assume other values don't
        return $this->encodeCookie(array(
            base64_encode($username),
            $this->generateCookieHash($username, $password),
        ));
    }