Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d2338d

Browse files
committed
Switch to a more secure hash of FreeType tarball.
1 parent f25e02e commit 9d2338d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setupext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def _get_xdg_cache_dir():
6767
# lib/matplotlib.__init__.py and also needs to be changed below in the
6868
# embedded windows build script (grep for "REMINDER" in this file)
6969
LOCAL_FREETYPE_VERSION = '2.6.1'
70-
# md5 hash of the freetype tarball
71-
LOCAL_FREETYPE_HASH = '348e667d728c597360e4a87c16556597'
70+
# SHA256 hash of the freetype tarball
71+
LOCAL_FREETYPE_HASH = '0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014'
7272

7373
if sys.platform != 'win32':
7474
if not PY3min:
@@ -294,11 +294,11 @@ def make_extension(name, files, *args, **kwargs):
294294

295295
def get_file_hash(filename):
296296
"""
297-
Get the MD5 hash of a given filename.
297+
Get the SHA256 hash of a given filename.
298298
"""
299299
import hashlib
300300
BLOCKSIZE = 1 << 16
301-
hasher = hashlib.md5()
301+
hasher = hashlib.sha256()
302302
with open(filename, 'rb') as fd:
303303
buf = fd.read(BLOCKSIZE)
304304
while len(buf) > 0:

0 commit comments

Comments
 (0)