Skip to content

Commit d6da8b2

Browse files
fix weak hash (#3070)
Signed-off-by: Sunny Anand <[email protected]> Co-authored-by: Alexandre Eichenberger <[email protected]>
1 parent 584ee43 commit d6da8b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.buildbot/jenkins_common.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ def strtobool(s: str) -> bool:
120120
def compute_file_sha1(file_name):
121121
"""Compute sha1 of a file."""
122122

123-
sha1sum = hashlib.sha1()
123+
sha3_256sum = hashlib.sha3_256()
124124
try:
125125
with open(file_name, "rb") as f:
126126
for data in iter(lambda: f.read(READ_CHUNK_SIZE), b""):
127-
sha1sum.update(data)
128-
return sha1sum.hexdigest()
127+
sha3_256sum.update(data)
128+
return sha3_256sum.hexdigest()
129129
except:
130130
return ""
131131

0 commit comments

Comments
 (0)