title: Obfuscation: hide hardcoded values in java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4427238/hiding-strings-in-obfuscated-code">hiding strings in Obfuscated code</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to hide a little some static Strings of my app in order to make it harder to decompile, this way like the constants like cipher algorithms names are harder to find in the obfuscated code.</p>
  
  <p>I've considered things like:</p>
  
  <pre><code>String CONCAT= "concat"+"string";
  String RAW_STRING= "raw_string";
  String FROM_BYTES=new String("from_bytes".getBytes());
  String FROM_CHARS=new String(new char[]{'f','r','o','m','_','c','h','a','r','s'});
  String FROM_CHAR2=new String(new char[]{102,114,111,109,95,99,104,97,114,115,95,50});
  </code></pre>
  
  <p>And the last two options seems to be "darker" than the  raw option but I imagine there are better ways for doing this.</p>
  
  <p>How can I improve this? Thanks </p>