Skip to content

Commit

Permalink
Set usedforsecurity=False in color_of function to enable FIPS complia…
Browse files Browse the repository at this point in the history
…nce (#8979)

Co-authored-by: Caleb Parnell Lampen <[email protected]>
  • Loading branch information
relativistic and Caleb Parnell Lampen authored Jan 9, 2025
1 parent 8d8c878 commit 26e84a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ def command_has_keyword(cmd, k):

@toolz.memoize
def color_of(x, palette=palette):
h = md5(str(x).encode())
h = md5(str(x).encode(), usedforsecurity=False)
n = int(h.hexdigest()[:8], 16)
return palette[n % len(palette)]

Expand Down

0 comments on commit 26e84a9

Please sign in to comment.