python/build/verify: support SHA-1 and SHA-256

This commit is contained in:
Max Kellermann 2016-12-29 21:19:40 +01:00
parent 79403afbe6
commit c623aa0f06
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ def guess_digest_algorithm(digest):
l = len(digest)
if l == 32:
return hashlib.md5
elif l == 40:
return hashlib.sha1
elif l == 64:
return hashlib.sha256
else:
return None