def __sign(self, text):
"""
Calculates the HMAC signature for the given
text with the current sign key and SHA256
:param text:
:return: Base64 encoded signature
"""
signature = HMAC.new(self.sign_key, text, SHA256).digest()
return base64.standard_b64encode(signature)
评论列表
文章目录