fix: Mark md5 as not used for security

This commit is contained in:
Inex Code 2024-03-08 16:07:45 +03:00 committed by Alexander Tomokhov
parent 2d5ac51c06
commit bda21b7507
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class RedisTokensRepository(AbstractTokensRepository):
@staticmethod @staticmethod
def token_key_for_device(device_name: str): def token_key_for_device(device_name: str):
md5_hash = md5() md5_hash = md5(usedforsecurity=False)
md5_hash.update(bytes(device_name, "utf-8")) md5_hash.update(bytes(device_name, "utf-8"))
digest = md5_hash.hexdigest() digest = md5_hash.hexdigest()
return TOKENS_PREFIX + digest return TOKENS_PREFIX + digest