import hashlib


def hexhash(file_path, num_bytes = 32, block_size = 65536):
	"""Compute a hex string hash for a file."""
	hasher = hashlib.sha256()
	hd = ''
	with open(file_path, 'rb') as fs:
		buf = fs.read(block_size)
		while len(buf) > 0:
			hasher.update(buf)
			buf = fs.read(block_size)
		hd = hasher.hexdigest()
	return hd[:num_bytes]