You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: aes.go
    path of file: ./repos/yao/crypto
    
    the code of the file until where you have to start completion: package crypto

import (
	"crypto/aes"
	"crypto/cipher"
	"encoding/base64"
	"encoding/hex"
	"fmt"
)

// AES256Encrypt AES Encrypt
func AES256Encrypt(key string, algorithm string, nonce string, text string, additionalData string, encoding ...string) (string, error) {
	switch algorithm {
	case "GCM":
		var add []byte
		if additionalData != "" {
			add = []byte(additionalData)
		}
		ciphertext, err := aes256GCMEncrypt([]byte(key), []byte(nonce), []byte(text), add)
		if err != nil {
			return "", err
		}
		if len(encoding) > 0 && encoding[0] == "base64" {
			return base64.StdEncoding.EncodeToString(ciphertext), nil
		}
		return hex.EncodeToString(ciphertext),
    
func AES256Decrypt(key string, algorithm string, nonce string, ciphertext string, additionalData string, encoding ...string) (string, error) {
	switch algorithm {
	case "GCM":
		var bytes []byte
		var err error
		if len(encoding) > 0 && encoding[0] == "base64" {
			bytes, err = base64.StdEncoding.DecodeString(ciphertext)
			if err != nil {
				return "", err
			}
		} else {
			bytes, err = hex.DecodeString(ciphertext)
			if err != nil {
				return "", err
			}
		}

		var add []byte
		if additionalData != "" {
			add = []byte(additionalData)
		}
		text, err := aes256GCMDecrypt([]byte(key), []byte(nonce), bytes, add)
		if err != nil {
			return "", err
		}

		return string(text), nil
	}
	return "", fmt.Errorf("algorithm %s not support", algorithm)
}