Merge pull request #100 from skyonedot/main

Fix bug about FeiShu Notification when secret exist
This commit is contained in:
zhinianboke 2025-10-30 08:47:59 +08:00 committed by GitHub
commit 5d5cac8a27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3020,8 +3020,8 @@ class XianyuLive:
if secret:
string_to_sign = f'{timestamp}\n{secret}'
hmac_code = hmac.new(
secret.encode('utf-8'),
string_to_sign.encode('utf-8'),
''.encode('utf-8'),
digestmod=hashlib.sha256
).digest()
sign = base64.b64encode(hmac_code).decode('utf-8')