!123 一些bug修复

* fix: 数据同步、数据迁移体验优化
* fix: des加密传输sql
* fix: 修复达梦字段注释显示问题
* fix: mysql timestamp 字段类型导出ddl错误修复
This commit is contained in:
zongyangleo
2024-08-22 00:43:39 +00:00
committed by Coder慌
parent 2deb3109c2
commit 43edef412c
26 changed files with 226 additions and 50 deletions

View File

@@ -0,0 +1,35 @@
package cryptox
import (
"encoding/base64"
"testing"
)
func TestAesEncrypt(t *testing.T) {
key := []byte("eyJhbGciOiJIUzI1NiIsInR5")
data := []byte("SELECT * FROM \"instruct\" OFFSET 0 LIMIT 25;")
encrypt, err := AesEncrypt(data, key)
if err != nil {
t.Error(err)
}
toString := base64.StdEncoding.EncodeToString(encrypt)
t.Log(toString)
decrypt, err := AesDecrypt(encrypt, key)
t.Log(string(decrypt))
}
func TestDes(t *testing.T) {
key := []byte("eyJhbGciOiJIUzI1NiIsInR5")
data := []byte("SELECT * FROM \"instruct\" OFFSET 0 LIMIT 25;")
encrypt, err := DesEncrypt(data, key)
if err != nil {
t.Error(err)
}
t.Log("encrypt", encrypt)
decrypt, err := DesDecrypt(encrypt, key)
if err != nil {
t.Error(err)
}
t.Log("decrypt", decrypt)
}