Skip to content

Commit 977b7f0

Browse files
authored
Make package FIPS compatible by marking blake2 hashing with usedforsecurity=False (#295)
1 parent 757d1dc commit 977b7f0

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Authors
1111
* Andreas Rammhold - https://github.com/andir
1212
* Nicholas Bunn - https://github.com/NicholasBunn
1313
* Nathan McDougall - https://github.com/nathanjmcdougall
14+
* Oleksandr Zaiats - https://github.com/z4y4ts

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ latest
99
* Improve contribution experience for Windows developers using Just.
1010
* Tweak Just commands for running version-specific Python tests.
1111
* Remove `typing-extensions` as a dependency.
12+
* Make package FIPS compatible by marking blake2 hashing with `usedforsecurity=False`.
1213

1314
3.14 (2025-12-10)
1415
-----------------

src/grimp/adaptors/caching.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def make_data_file_name(
3737
# Use a hash algorithm with a limited size to avoid cache filenames that are too long
3838
# the filesystem, which can happen if there are more than a few root packages
3939
# being analyzed.
40-
safe_unicode_identifier = hashlib.blake2b(bytes_identifier, digest_size=20).hexdigest()
40+
safe_unicode_identifier = hashlib.blake2b(
41+
bytes_identifier, digest_size=20, usedforsecurity=False
42+
).hexdigest()
4143
return f"{safe_unicode_identifier}.data.json"
4244

4345
@classmethod

0 commit comments

Comments
 (0)