This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: Gui Composer : How do I hide my code from being inspected in

Tool/software: Code Composer Studio

I am planning to use Gui Composer https://dev.ti.com/gc/  to create an application to create a system estimator. I do not want the user of this application to be able to inspect the code and figure out the formulas or the margins that I have used in my calculations. How do I protect this code ? Currently if I right click and inspect element on any of the GUI Composer Gallery applications, I can see the complete code and formulas used.

Please let me know if there is any way to protect the underlying formulas. This is an important feature needed for my application.

Thanks,

Desmond

  • Hi Desmond, 

    Currently GC does not have any feature that would make this easy. javascript needs to be interpreted by the browser, thus there are not many choices. However, there are tools/libraries that can obfuscate/minimize javascript. e.g.  there are others if you search on the web. I have not used this particular library. However, these tools will make things a lot harder to read understand. However, someone that spends enough effort could probably reverse engineer this.  

    Martin

  • Hi Martin,

    Thanks for your answer. If I understand correctly, there is no way to concretely hide formulas in the cloud based version of the GUI composer. If this is a strong requirement, could you please suggest what my options could be ?

    1. Create a standalone GUI composer windows application instead of adding it to the gallery. Is there any plan in the future to remove this option of creating a standlone appilcation? I assume standalone application will be ensure the formulas remain hidden.

    2. Would there be a way to protect data in the cloud based GUI composer in future versions? Is this a possible enhancement?


    Also, Could you also let me know if there is any way to add graphs which are not part of the gui components in GC ?

    For example, is it possible to add a bar graph using chart.js as shown in the example :
    www.sitepoint.com/.../

    If so, can you tell me how to do so ?
    Where should I add the code :
    </canvas><canvas id="myChart"></canvas>

    and
    <script src="cdnjs.cloudflare.com/.../script>

    I was unable to find bar graphs and pie charts as part of the available gui composer components and hence need an alternative. Could you please help ?

    Thanks,
    Desmond
  • Hi Martin,

    I was able to create nice graphs using the ti_widget_plot. So it will not be necessary to the part of my query above regarding graphs.

    Hiding data is still my concern. It would be great if you could answer the part of my query regarding the same.

    Thanks,
    Desmond
  • Hi Desmond, 

    re; standalone desktop application being more secure: In this case the application (html and js scripts) are still the same. The main difference on the desktop is that webserver and client (i.e. browser) are bundled together. However, your formulas are still javascript and are just as visible as through Gallery. Similar option to obfuscate and minify your javascript code exist.

    In standalone application scenario, nodewebkit (which is the webserver engine) does support ability to plugin native binary components, which then can be accessed. You could potentially use this to hide your formulas. However, we do not have any kind of "builtin", easy to use support for this. This would mean that you would need to develop this module, get base desktop components, integrate binary module, then create your own installer and create an HTML app that leverages this module. Below is a link from node.js documentation that provides some information. 

    Down the road there is a potential to use something like webassembly or asm.js to help with this. We have not done much investigation at this point how this could be integrated into GUI Composer or how much more "secure" this approach would be. Below is a link to some discussion:

    Martin