python/build/verify: support SHA-1 and SHA-256
This commit is contained in:
parent
79403afbe6
commit
c623aa0f06
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue