[reportlab-users] Use of hashlib.md5
Christoph Zwerschke
cito at online.de
Thu Sep 18 14:15:33 EDT 2025
Recently I got this error on a Linux Box
File ".../reportlab/pdfbase/pdfdoc.py", line 137, in __init__
sig = self.signature = md5(usedforsecurity=False)
TypeError: openssl_md5() takes no keyword arguments
This kind of error can be avoided if you use hashlib.new('md5', ...)
instead of hashlib.md5(...). There are 3 or 4 more such places in the
code where this should be changed.
see
https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5
I can confirm that it works for me after making this change.
-- Christoph
More information about the reportlab-users
mailing list