From 2e00574e8ed82e7bed4bb0431d91c913f7fdc7a1 Mon Sep 17 00:00:00 2001 From: aitbc Date: Sat, 25 Apr 2026 21:06:15 +0200 Subject: [PATCH] Replace MD5 with SHA256 for cache key generation in http_client.py --- aitbc/http_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aitbc/http_client.py b/aitbc/http_client.py index 32cc6f30..ebd0f123 100644 --- a/aitbc/http_client.py +++ b/aitbc/http_client.py @@ -125,7 +125,7 @@ class AITBCHTTPClient: if params: import hashlib param_str = str(sorted(params.items())) - return f"{url}:{hashlib.md5(param_str.encode()).hexdigest()}" + return f"{url}:{hashlib.sha256(param_str.encode()).hexdigest()}" return url def _get_cache(self, cache_key: str) -> Optional[Dict[str, Any]]: @@ -568,7 +568,7 @@ class AsyncAITBCHTTPClient: if params: import hashlib param_str = str(sorted(params.items())) - return f"{url}:{hashlib.md5(param_str.encode()).hexdigest()}" + return f"{url}:{hashlib.sha256(param_str.encode()).hexdigest()}" return url def _get_cache(self, cache_key: str) -> Optional[Dict[str, Any]]: