参考:https://www.cnblogs.com/yyds/p/7072492.html

hmac.new(bytes(self.token,'utf-8'),msg=bytes(content,'utf-8'),digestmod=sha256).hexdigest()

key为密钥,msg为初始数据,digestmod为所使用的哈希算法,默认为hashlib.md5
hexdigest():十六进制格式的字符串

相关文章:

  • 2021-06-18
  • 2021-08-01
  • 2021-12-05
  • 2021-12-05
  • 2021-11-16
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-04-28
  • 2021-07-16
  • 2021-12-02
  • 2021-07-12
  • 2022-12-23
  • 2021-11-21
相关资源
相似解决方案