Remove padding from base64 hashes
This commit is contained in:
@@ -111,7 +111,9 @@ def event_hash(event_object):
|
|||||||
|
|
||||||
event_json_bytes = canonical_json(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:
|
def pubkey() -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user