Remove padding from base64 hashes

This commit is contained in:
2025-10-13 11:12:39 -04:00
parent 76f89beb29
commit b178011ad9

View File

@@ -111,7 +111,9 @@ def event_hash(event_object):
event_json_bytes = canonical_json(event_object)
return base64.b64encode(hashlib.sha256(event_json_bytes).digest()).decode("utf-8")
return base64.b64encode(
hashlib.sha256(event_json_bytes).digest()
).decode("utf-8").rstrip("=")
def pubkey() -> str: