We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecb5d6c commit 12cf312Copy full SHA for 12cf312
1 file changed
india_compliance/utils/__init__.py
@@ -1,12 +0,0 @@
1
-import hashlib
2
-import json
3
-
4
5
-def get_hash(data: list | dict | str) -> str:
6
- if isinstance(data, dict | list):
7
- data = json.dumps(data, sort_keys=True)
8
9
- if isinstance(data, str):
10
- data = data.encode()
11
12
- return hashlib.sha256(data).hexdigest()
0 commit comments