def hexString(value, numBytes):
	"""Returns a fixed length hex string encoding a provided value.

	value -- an integer value
	numBytes -- the byte length to encode
	"""

	rawEncoding = str(hex(value))	#convert number to hex string
	encoding = rawEncoding[2:]	#strip off "0x"

	#Fill out full length
	for i in range(numBytes*2 - len(encoding)):
		encoding = "0" + encoding

	return encoding.upper()