import hashlib


def hash_all(data:list) -> bytes:
	"""
		- Do a hash on all of the given data
		Returns:
			hash_data(bytes): Note that this function returns bytes and not a hex string
	"""
	h = hashlib.blake2b(digest_size=32)
	for d in data:
		if isinstance(d, str):
			h.update(d.encode())

		elif isinstance(d, list):
			h.update(bytes(d))

		else:
			raise ValueError("An invalid type of data has been passed. This function only processese string and lists")
	return h.digest()