Preventing classfile from decompilers
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, May 17, 2001 03:10 AM

Can i secure My class file from decompilation ? if yse How?

Re: Preventing classfile from decompilers

Posted By:   Luigi_Viggiano  
Posted On:   Thursday, May 17, 2001 03:23 PM

I suggest an idea: if you use a cipher algorithm implemented in native code, and interfacing it with java, you can make your own ClassLoader using a native decipher. Also don't think native code is difficult to reverse.

Re: Preventing classfile from decompilers

Posted By:   Anonymous  
Posted On:   Thursday, May 17, 2001 10:18 AM

As someone has already pointed out, no, the only protection it's using an "obfuscator", or the Java Virtual Machine will not be able to read the code.

What the "obfuscators" normally do, to try to protect the code, still maintaining compliant to the spec, is trying to change the name of the variables and methods and object to make it the code harder to understand... sometimes the names are reserved names, to make even harder the recompilation process.

Here there is a list of some of them:

     Commercial

     Free.

Regards.

Re: Preventing classfile from decompilers

Posted By:   Christopher_Schultz  
Posted On:   Thursday, May 17, 2001 09:37 AM

If you mean decompiling it into bytecode, then No. If you could, then JVM's could not run your code.



If you mean decompiling into Java source code, then basically the answer is also No. Given the bytecode, a smart programmer (or a program written by one) can reconstruct the approximate Java source code that generateed the class file.



What you can do is something called obfuscation, which does stuff like re-name all of your methods and variables to gibberish so that the resulting code is very hard to follow.



-chris
About | Sitemap | Contact