Skip to content

Commit

Permalink
replace md5 by sha1 checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
mwageringel committed Jul 14, 2020
1 parent b692483 commit 504d69d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
SRC = "fgb_sage"
VERSION = open("VERSION").read().strip()

def md5sum(filename):
def sha1sum(filename):
import hashlib
BLOCKSIZE = 65536
hasher = hashlib.md5()
hasher = hashlib.sha1()
with open(filename, 'rb') as f:
buf = f.read(BLOCKSIZE)
while len(buf) > 0:
Expand Down Expand Up @@ -54,7 +54,7 @@ def run(self):
log.error("""Download failed. You may wish to download the file "%s" manually from "%s" and place it in the "upstream/" directory.""" %
(checksums["tarball"], UPSTREAM_TAR_URL))
sys.exit(1)
if md5sum(libfgb_file) != checksums["md5"]:
if sha1sum(libfgb_file) != checksums["sha1"]:
log.error("Checksum for file %s is different." % libfgb_file)
sys.exit(1)

Expand Down

0 comments on commit 504d69d

Please sign in to comment.