package utils

import (
	"encoding/base64"
	"fmt"
	"testing"
)

func TestAesDecrypt(t *testing.T) {
	key := []byte("0123456789abcdef")
	//key, _ := base64.StdEncoding.DecodeString("dJAm7iojW5NwVLwa1Ydx8g==")
	fmt.Println(key)
	result, err := AesEncrypt([]byte("hello world"), key)

	fmt.Println(base64.StdEncoding.EncodeToString(result))
	origData, err := AesDecrypt(result, key)
	if err != nil {
		panic(err)
	}
	fmt.Println(string(origData))
}
