def splitBytestring(bytestring, sliceSize):
	"""Splits a bytesting into sliceSize slices. The last slice can be shorter than sliceSize.
	
	Arguments:
		bytestring {[bytes]} -- Any kind of bytestring works.
		sliceSize {[int]} -- Desired length in bytes of each slice.
	
	Returns:
		[tuple] -- Tuple containing the split slices.
	"""

	byteList = []
	remainingSize = len(bytestring)
	lastIndex = 0

	while remainingSize >= sliceSize:
		byteList.append(bytestring[lastIndex:lastIndex+sliceSize])
		lastIndex += sliceSize
		remainingSize += -sliceSize
	if remainingSize > 0:
		byteList.append(bytestring[lastIndex:])

	return tuple(byteList)