def HexStringToBytes ( hexStr ):
    """
    Convert a string of hex bytes to an array of bytes. The Hex String values
    may or may not be space separated
    """
    bytes = []
    
    # Remove spaces
    hexStr = ''.join( hexStr.rstrip().split(" ") )
    for i in range(0, len(hexStr), 2):
        bytes.append( int (hexStr[i:i+2], 16) )

    return bytes