This commit is contained in:
richboo111
2023-07-12 17:34:39 +08:00
parent 82b8b9df64
commit f9ef8b3afb

View File

@@ -360,9 +360,7 @@ func DecryptIm(appID int, msg string) (string, error) {
data, _ := base64.StdEncoding.DecodeString(msg)
key := utils.LimitUTF8StringLen2(rel[appID], 16)
res, err := utils.AESCBCDecpryt(data, []byte(key), []byte(key))
globals.SugarLogger.Debugf("DecryptIm err=%v", err)
if len(string(res)) > 0 && err == nil {
globals.SugarLogger.Debugf("DecryptIm res=%v", string(res))
return string(res), nil
}
return "", err