From 164f512a6ecd0c05a37a80345e181fc1c69cb3b0 Mon Sep 17 00:00:00 2001 From: mivanit Date: Sun, 23 Feb 2025 22:49:18 -0700 Subject: [PATCH] make format --- muutils/misc/hashing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/muutils/misc/hashing.py b/muutils/misc/hashing.py index b8eb2070..0e384cdc 100644 --- a/muutils/misc/hashing.py +++ b/muutils/misc/hashing.py @@ -17,6 +17,7 @@ def stable_hash(s: str | bytes) -> int: # get digest and convert to int return int.from_bytes(hash_obj.digest(), "big") + def stable_json_dumps(d) -> str: return json.dumps( d, @@ -24,6 +25,7 @@ def stable_json_dumps(d) -> str: indent=None, ) + def base64_hash(s: str | bytes) -> str: """Returns a base64 representation of the hash of the given string. not cryptographically secure""" s_bytes: bytes