From b178011ad97c8e7811c6f2d5842ac293d14a7816 Mon Sep 17 00:00:00 2001 From: Kierre Date: Mon, 13 Oct 2025 11:12:39 -0400 Subject: [PATCH] Remove padding from base64 hashes --- vona/globals/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vona/globals/__init__.py b/vona/globals/__init__.py index 112c1ad..622521c 100644 --- a/vona/globals/__init__.py +++ b/vona/globals/__init__.py @@ -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: