Browse Source

update

master
dengbiao 2 days ago
parent
commit
2c49250838
2 changed files with 13 additions and 0 deletions
  1. +12
    -0
      app/hdl/hdl_demo.go
  2. +1
    -0
      app/router/router.go

+ 12
- 0
app/hdl/hdl_demo.go View File

@@ -127,3 +127,15 @@ func CreateSign(c *gin.Context) {
}, nil)
return
}

func AesDecryptByECB(c *gin.Context) {
body, _ := ioutil.ReadAll(c.Request.Body)
strs, err := aes.AesDecryptByECB(md.AesKey, string(body))
if err != nil {
e.OutErr(c, e.ERR, err.Error())
return
}

e.OutSuc(c, strs, nil)
return
}

+ 1
- 0
app/router/router.go View File

@@ -49,6 +49,7 @@ func Init() *gin.Engine {
func route(r *gin.RouterGroup) {
r.GET("/test", hdl.Demo)
r.Any("/createSign", hdl.CreateSign)
r.Any("/aesDecryptByECB", hdl.AesDecryptByECB)
r.Use(mw.CheckSign)
r.Any("/testCreateSign", hdl.TestCreateSign)
r.POST("/register", hdl.Register)


Loading…
Cancel
Save