Friday, February 19, 2016

Re: How to protect IP in GWT.

What I want is listed below:

1. I have some Java source code like this
public abstract class StartEntryPoint implements EntryPoint {

    public void onModuleLoad() {
         callNeedToProtect1();
         callNeedToProtect2();

         callProtectedMethod();
    }

    private void callNeedToProtect1() {
       //some key algorithm here I don't want my regular developer to see
    }

    private void callNeedToProtect2() {
       //some key algorithm here I don't want my regular developer to see
    }

    public abstract void callProtectedMethod();
}

2. I use GWT compiler to compile all the above Java code into a big javascript file (SSO).

3. I want to use JSNI to wrap the above generated javascript back to StartEntryPoint.java like

/**
 *This file is going to be used by regular developers. For production, this file is going to be replaced by a file on Step 1.
 */
public abstract StartEntryPoint extends JavaScriptObject implements EntryPoint {    /
     
     public void onModuleLoad() {
          privateModuleLoad();
     }

     private final native void privateModuleLoad() /*-{
           call some generated javascript code here
     }-*/;

     public abstract void callProtectedMethod();
}

I hope I explain well about what I want to achieve. Thanks!

On Saturday, February 20, 2016 at 6:54:36 AM UTC+8, Thomas Broyer wrote:
Put differently you need a ProGuard that would work with sources. Not sure that exists …

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment