def bytes_to_int(data):
    """
    Convert bytes to integer
    :param data: bytes of data
    :return: result int
    """
    result = 0
    for b in data:
        result = result * 256 + int(b)
    return result
