How can we help you today? How can we help you today?

Add support for [ForceObfuscate] on enums

Hi,

I experience that a few (out of many) enums are not being obfuscated in our solution. Probably because they were deemed "unsafe" to obfuscate. I know that SmartAssembly analyzes for the use of 'TryParse/Parse' on a string representation of an enum member, or calls 'ToString' on the enum, etc.

But having investigated the usage of these enums myself in our solution, I can guarantee that they are safe to obfuscate.

So, as the title says, I think you should consider extending the [ForceObfuscate] attribute to also work on enums.
Yes, I know all the counter arguments (what if some code uses 'TryParse/Parse' on a string representation of an enum member, or calls 'ToString' on the enum, etc.). But I guess that is what the [ForceObfuscate] attribute is for, right? To circumvent safety measures. I know what I'm doing and I know the dangers of using [ForceObfuscate]. Also, I am well aware that I can omit the 'DoNotObfuscateAnyEnums' XML element in the project file (which I already do, and it doesn't alleviate the issue).

Best regards
S
sol_amp
0

Comments

3 comments

  • sol_amp
    Hello,

    Hope you are well!
    Any confirmation that you have received this post would be much appreciated!

    Many thanks!

    S
    sol_amp
    0
  • sol_amp
    Hello again,

    Any feedback on my feature suggestion would be nice?
    Many thanks

    Best regards
    S
    sol_amp
    0
  • sol_amp
    .
    sol_amp
    0

Add comment

Please sign in to leave a comment.