蛋蛋星球-客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 1 седмица
преди 1 седмица
преди 1 седмица
1234567891011121314151617181920212223242526
  1. package aes
  2. import (
  3. "bytes"
  4. "fmt"
  5. "io/ioutil"
  6. "net/http"
  7. )
  8. func CheckBody(request *http.Request, key string) {
  9. body, _ := ioutil.ReadAll(request.Body)
  10. if string(body) != "" {
  11. fmt.Println("check_", string(body))
  12. str, _ := AesDecryptByECB(key, string(body))
  13. if str != "" {
  14. request.Body = ioutil.NopCloser(bytes.NewBuffer([]byte(str)))
  15. }
  16. }
  17. return
  18. }
  19. func CheckError(err error) {
  20. if err != nil {
  21. panic(err)
  22. }
  23. }