94 func generateSign(data, key []byte) string {
95 mac := hmac.New(sha1.New, key)
96 mac.Write(data)
97 expectedMAC := mac.Sum(nil)
98 return base64.StdEncoding.EncodeToString(expectedMAC)
99 }
signature := generateSign([]byte(data), []byte("123"))

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2021-09-09
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-09-08
  • 2021-07-14
相关资源
相似解决方案