code: func (cse *SessionCookieEngine) GetCookie(s session.Session) *http.Cookie {
  	var sessionValue string
  	ts := s.GetExpiration(cse.ExpireAfterDuration)
  	if ts.IsZero() {
  		s[session.TimestampKey] = session.SessionValueName
  	} else {
  		s[session.TimestampKey] = strconv.FormatInt(ts.Unix(), 10)
  	}
  
  	// Convert the key to a string map
  	stringMap := s.Serialize()
  
  	for key, value := range stringMap {
  		if strings.ContainsAny(key, ":\x00") {
  			panic("Session keys may not have colons or null bytes")
  		}
  		if strings.Contains(value, "\x00") {
  			panic("Session values may not have null bytes")
  		}
  		sessionValue += "\x00" + key + ":" + value + "\x00"
  	}
  
  	if len(sessionValue) > 1024*4 {
  		sessionEngineLog.Error("SessionCookieEngine.Cookie, session data has exceeded 4k limit (%d) cookie data will not be reliable", "length", len(sessionValue))
  	}
  
  	sessionData := url.QueryEscape(sessionValue)
  	sessionCookie := &http.Cookie{
  		Name:     CookiePrefix + session.SessionCookieSuffix,
  		Value:    Sign(sessionData) + "-" + sessionData,
  		Domain:   CookieDomain,
  		Path:     "/",
  		HttpOnly: true,
  		Secure:   CookieSecure,
  		Expires:  ts.UTC(),
  		MaxAge:   int(cse.ExpireAfterDuration.Seconds()),
  	}
  	return sessionCookie
  
  }
docs: // Convert session to cookie