MCPcopy Create free account
hub / github.com/numpy/numpy / sha256_of_file

Function sha256_of_file

tools/cythonize.py:125–129  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

123 f.write("%s %s %s\n" % (key, value[0], value[1]))
124
125def sha256_of_file(filename):
126 h = hashlib.sha256()
127 with open(filename, "rb") as f:
128 h.update(f.read())
129 return h.hexdigest()
130
131#
132# Main program

Callers 1

get_hashFunction · 0.85

Calls 3

openFunction · 0.85
updateMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected