Skip to content

Commit

Permalink
Merge pull request #2130 from RenanGBarreto/master
Browse files Browse the repository at this point in the history
Replace the MD5 usage by SHA256
  • Loading branch information
cyberw authored Jul 9, 2022
2 parents 0be56b3 + 029bdfe commit 218e7f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def parse_error(cls, error: Optional[Union[Exception, str]]) -> str:
@classmethod
def create_key(cls, method: str, name: str, error: Optional[Union[Exception, str]]) -> str:
key = f"{method}.{name}.{StatsError.parse_error(error)!r}"
return hashlib.md5(key.encode("utf-8")).hexdigest()
return hashlib.sha256(key.encode("utf-8")).hexdigest()

def occurred(self) -> None:
self.occurrences += 1
Expand Down

0 comments on commit 218e7f4

Please sign in to comment.