avatar
文章
109
标签
41
分类
12
📝主页
📱作品
📬联系
🧑‍💻关于
👋Harry Blog
搜索
📝主页
📱作品
📬联系
🧑‍💻关于

👋Harry Blog

Go ioutil Deprecated After 1.16
发表于2022-11-13|DevelopmentBackend|go
ioutil package deprecated; move helpers to io or os in Go 1.16+.
go sha256withRSA签名 base64
发表于2022-11-10|开发后端|go
生成密钥文件GenerateRSAKey(2048)//模拟发送方//要发送的消息msg := []byte("hello world")//生成签名sign := GetSign(msg, "private.pem")fmt.Println("signlen lenlen", string(sign))//模拟接收方//接受到的消息acceptmsg := []byte("hello world")//接受到的签名acceptsign := sign//验证签名result := VerifySign(acceptmsg, acceptsign, "public.pem")fmt.Println("验证结果:", result)
Go RSA SHA256 Sign & Verify
发表于2022-11-10|DevelopmentBackend|go
Generate RSA keys, sign data with SHA-256, and verify signature in Go.
Go Read Request Body Twice
发表于2022-11-01|DevelopmentBackend|go
Restore request body after reading to allow subsequent handlers consumption.
go第二次获取body获取不到问题
发表于2022-11-01|开发后端
在使用os.ReadAll(r.Body)方法后,需要执行下面方法,将body重新写回去 ctx.Request.Body = io.NopCloser(bytes.NewBuffer(signStrByte)) // 把body再写回去,不然别的地方取不到 经实践发现 使用gin.Context.Bindxxx相关方法 ,也需要执行上述方法重写body
Go Gin API Sign Middleware
发表于2022-10-28|DevelopmentBackend|go
Simple request signature verification middleware for Gin.
golang gin接口签名sign
发表于2022-10-28|开发后端
golang gin接口签名sign gin.Default().Group("").Use(xxx.CheckSign()){ //注册需要签名的路由 gin.Default().Group("testrouter").POST("dotest", func(ctx *gin.Context) { response.Result(401, gin.H{}, "hello", ctx) }) } sign.go 签名 验签 package xxximport ( "crypto/sha256" "encoding/hex" "fmt" "github.com/flipped-aurora/gin-vue-admin/server/model/common/response" "github.com/gin-gonic/gin")var ( ...
1…456…16
avatar
Harry
文章
109
标签
41
分类
12
关于
最新文章
comfyui通过Api请求报错,通过comfyui界面执行正常2025-04-18
ComfyUI workflow fails via API but succeeds in UI2025-04-18
Edit Video Duration Metadata2025-03-16
修改视频元信息时长 duration修改2025-03-16
comfyui gemeni apikey 配置2025-03-15
分类
  • Development50
    • Backend29
      • Database2
    • Frontend19
    • Tools1
  • Note3
  • 开发53
    • 前端21
    • 后端31
      • 数据库3
    • 工具1
  • 随笔3
标签
字体 java video mysql uniapp struct Vue.js jar PHP go wechat 进程/线程 MQTT electron MySQL font canvas emoji php javascript 视频 apicloud vcard comfyui 绘图 ComfyUI vue nginx Go mqtt axios git windows html Nginx ApiCloud payment python concurrency JS
归档
  • 四月 2025 2
  • 三月 2025 3
  • 十月 2024 2
  • 五月 2024 6
  • 五月 2023 2
  • 四月 2023 8
  • 三月 2023 4
  • 十一月 2022 6
© 2017 - 2025 By Harry
搜索
数据加载中