-
Notifications
You must be signed in to change notification settings - Fork 65
🔧 Add FIPS compliant flag to md5 call #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔧 Add FIPS compliant flag to md5 call #162
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Heya, |
Ah indeed, and I thought it was just a nice one-line PR :) |
They never are 😂 |
So I am not too proficient with has_usedforsecurity_support = float(sys.version[:3]) >= 3.9 Or something with the And then just use something like: md5_kwargs = {"usedforsecurity": False} if has_usedforsecurity_support else {}
hash = hashlib.md5(content.encode("utf8"), **md5_kwargs ).hexdigest() |
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
@chrisjsewell do you think this is sufficient? I'll use my fork until the next release. |
Yep I think it's fine but bare with me to merge |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
+ Coverage 89.18% 90.01% +0.82%
==========================================
Files 11 11
Lines 962 951 -11
==========================================
- Hits 858 856 -2
+ Misses 104 95 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the wait but all good now, and removed 3.9 check as 3.8 was dropped 😄
Closes #161