|
|
@ -107,7 +107,7 @@ func (t *Transport) ResponseEncoderWithEncrypt() http.EncodeResponseFunc { |
|
|
|
if t.env == enum.Env_Production { |
|
|
|
if t.env == enum.Env_Production { |
|
|
|
ecbMsg, err := sm4.Sm4Ecb([]byte(t.sm4Key), data, true) |
|
|
|
ecbMsg, err := sm4.Sm4Ecb([]byte(t.sm4Key), data, true) |
|
|
|
if err == nil { |
|
|
|
if err == nil { |
|
|
|
dataRes = hex.EncodeToString(ecbMsg) |
|
|
|
dataRes = fmt.Sprintf("\"%s\"", hex.EncodeToString(ecbMsg)) |
|
|
|
w.Header().Set("en", "4") |
|
|
|
w.Header().Set("en", "4") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|