Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Feb 24, 2025
1 parent 0af82ea commit 164f512
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions muutils/misc/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ 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,
sort_keys=True,
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
Expand Down

0 comments on commit 164f512

Please sign in to comment.