修复缓存
Build docker and publish / build (20.15.1) (push) Successful in 7m26s

This commit is contained in:
2026-03-06 21:58:29 -08:00
parent 19932bb9f7
commit 4d913c1728
175 changed files with 437 additions and 12104 deletions
-29
View File
@@ -1,29 +0,0 @@
package pkgaes
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
)
func TestAes(t *testing.T) {
params := map[string]interface{}{
"method": "email",
"account": "admin@ppanel.dev",
"password": "password",
}
marshal, _ := json.Marshal(params)
jsonStr := string(marshal)
encrypt, iv, err := Encrypt([]byte(jsonStr), "123456")
if err != nil {
t.Fatalf("encrypt failed: %v", err)
}
decrypt, err := Decrypt(encrypt, "123456", iv)
if err != nil {
t.Fatalf("decrypt failed: %v", err)
}
assert.Equal(t, jsonStr, decrypt, "decrypt failed")
}