MCPcopy Index your code
hub / github.com/kivy/python-for-android / algsum

Function algsum

pythonforandroid/recipe.py:1714–1720  ·  view source on GitHub ↗

Calculate the digest of a file.

(alg, filen)

Source from the content-addressed store, hash-verified

1712
1713
1714def algsum(alg, filen):
1715 '''Calculate the digest of a file.
1716 '''
1717 with open(filen, 'rb') as fileh:
1718 digest = getattr(hashlib, alg)(fileh.read())
1719
1720 return digest.hexdigest()

Callers 1

downloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected