PIbd-42_SSPR/app/services/hash_generator.py
2024-10-21 23:12:37 +03:00

8 lines
199 B
Python

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