diff --git a/go.mod b/go.mod index 9d6bbb06d7b4826a1441845bcd6c8e8f6dca08de..651c81ca2d23c4e00dfc402f738409adb9928d49 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,6 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ims v1.0.479 // indirect github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 // indirect - github.com/xxtea/xxtea-go v1.0.0 // indirect golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect golang.org/x/text v0.3.6 // indirect diff --git a/go.sum b/go.sum index d7eec67ad0860985095e8be9e84f59f1a3d576a4..2ed80bc29273cfcd79763c27f459d2cb11fd42ec 100644 --- a/go.sum +++ b/go.sum @@ -228,8 +228,6 @@ github.com/tencentyun/tls-sig-api-v2-golang v1.1.0 h1:dWbCuoTaRWvcS/RWW/8RIAvLRA github.com/tencentyun/tls-sig-api-v2-golang v1.1.0/go.mod h1:D/i1nQrP1hSXxxz+SAmjaprAwH3EhYaktJG6BObWnFE= github.com/tencentyun/tls-sig-api-v2-golang v1.3.0 h1:mW4onVqOP6MqkJtTay74Tch6NvjwQRXeCuhUC/p6YYk= github.com/tencentyun/tls-sig-api-v2-golang v1.3.0/go.mod h1:0L1MSijyEq6a74xZ02h0qKfN8y6RcvDiNabIZWXereE= -github.com/xxtea/xxtea-go v1.0.0 h1:HUeElH97FsZS/+l+iroj0lhosKe47VMtdIL2Lz3MeFg= -github.com/xxtea/xxtea-go v1.0.0/go.mod h1:2uvuCBt0VXxijrX5ieiAeeNT2+2MIsrs1DI9iXz7OOQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/utils/encrypt.go b/utils/encrypt.go index 1561f9b712a7cc57394ee852d24db381c99e287d..7e698aa7934ef2959cc6302ff54f17b6fd897fb5 100644 --- a/utils/encrypt.go +++ b/utils/encrypt.go @@ -7,7 +7,6 @@ import ( "encoding/base64" "encoding/json" "errors" - "github.com/xxtea/xxtea-go/xxtea" ) func EncryptionData(data interface{}, aeskey []byte) string { @@ -84,10 +83,3 @@ func pKCS5UnPadding(origData []byte) []byte { unpadding := int(origData[length-1]) return origData[:(length - unpadding)] } - -func EncryptionData2(data interface{}, key []byte) string { - str, _ := json.Marshal(data) - encrypted := xxtea.Encrypt(str, key) - base64Str := base64.StdEncoding.EncodeToString(encrypted) - return string(base64Str) -}