PIbd-42_SSPR/app/services/hash_generator.py

8 lines
199 B
Python
Raw Permalink Normal View History

2024-10-22 00:12:37 +04:00
import hashlib
import json
def generate_hash(params):
params_string = json.dumps(params, sort_keys=True)
unique_hash = hashlib.md5(params_string.encode()).hexdigest()
return unique_hash