pytroll / pyresample

Geospatial image resampling in Python
http://pyresample.readthedocs.org
GNU Lesser General Public License v3.0
350 stars 94 forks source link

Use 'usedforsecurity' flag when using hashing functions for non-security purposes #452

Open djhoese opened 2 years ago

djhoese commented 2 years ago

We occasionally use python's hashlib to generate hashes for things like AreaDefinitions. On FIPS-enabled systems, certain hashing algorithms are disabled from use for security reasons. This is common in certain US government organizations. It turns out there is a feature in some versions of Python to say "I know I'm using md5sum and it is not well-suited for security purposes, but I'm not using it for security" by passing a usedforsecurity=False keyword argument to some of the hashing functions. See it discussed here:

https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5