C# .NET - Dotfuscator's String Encryption Not Working

Asked By Robbe Morris on 28-Aug-09 09:48 AM

Just thought I'd pass this little tidbit along.  In Dotfuscator 4.5, the string encryption will not execute if the code in your method isn't complex enough.  For instance, the following would not have its strings encrypted:

public MyClass GetMyClass()
{
   return new MyClass("Some String Value");
}
I had to actually do this:
public MyClass GetMyClass()
{
  var record = new MyClass();
  record.SomeProperty = "Some String Value";
  return record;
}
As always, you'll want to use reflector (or some other tool) to inspect the obfuscation results especially with mission critical areas.  Do not just assume that Dotfuscator is infallable.

Good catch Mr. Morris - Robbe Morris replied to Robbe Morris on 31-Aug-09 06:09 PM

end of post