Skip to content

Commit c0e215b

Browse files
committed
Use shall instead of md5
Performance is not affected here. This is needed to make the quantifiedcode linter happy. As there is not much difference between the two, sha1 seems OK and can be used instead.
1 parent 140e196 commit c0e215b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygccxml/parser/declarations_cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def file_signature(filename):
2222
# Extend here to use md5 hash for signature
2323
# - This change allows duplicate auto-generated files to be recognized
2424

25-
sig = hashlib.md5()
25+
sig = hashlib.sha1()
2626
with open(filename, "rb") as f:
2727
buf = f.read()
2828
sig.update(buf)
@@ -38,7 +38,7 @@ def configuration_signature(config):
3838
to be different between runs.
3939
"""
4040

41-
sig = hashlib.md5()
41+
sig = hashlib.sha1()
4242
if isinstance(config, cxx_parsers_cfg.xml_generator_configuration_t):
4343
sig.update(str(config.xml_generator_path).encode())
4444
sig.update(str(config.working_directory).encode('utf-8'))

0 commit comments

Comments
 (0)