hunk.code_window:   size?: Size;
     tooltip?: string;
     children: ReactNode;
     errors?: ReactNode;
     required?: boolean;
   }
   export function FormControl({
  
hunk.labels: keep keep keep keep add keep keep keep
hunk.after_edit:   setTooltipHtmlMessage?: boolean;
  
hunk.file_path: app/react/components/form-components/FormControl/FormControl.tsx
hunk.type: add
file: package chisel
  
  import (
  	"encoding/base64"
  	"fmt"
  	"strconv"
  	"strings"
  )
  
  // GenerateEdgeKey will generate a key that can be used by an Edge agent to register with a Portainer instance.
  // The key represents the following data in this particular format:
  // portainer_instance_url|tunnel_server_addr|tunnel_server_fingerprint|endpoint_ID
  // The key returned by this function is a base64 encoded version of the data.
  func (service *Service) GenerateEdgeKey(url, host string, endpointIdentifier int) string {
  	keyInformation := []string{
  		url,
  		fmt.Sprintf("%s:%s", host, service.serverPort),
  		service.serverFingerprint,
  		strconv.Itoa(endpointIdentifier),
  	}
  
  	key := strings.Join(keyInformation, "|")
  	return base64.RawStdEncoding.EncodeToString([]byte(key))
  }
  