XinYeYouKu/app/services/XinYeService.go

22 lines
368 B
Go
Raw Normal View History

2024-06-11 18:47:02 +08:00
package services
import (
"encoding/json"
"fmt"
"qteam/app/http/entities/front"
)
func DecryptXyData(data string) (info front.XyDecryptData) {
2024-06-12 19:11:00 +08:00
// 先解Base64,再解Hex16进
decrypt, err := SM2Decrypt(data)
2024-06-11 18:47:02 +08:00
if err != nil {
return
}
err = json.Unmarshal([]byte(decrypt), &info)
if err != nil {
fmt.Println("解析JSON错误:", err)
return
}
return
}