Options

Add support for [ForceObfuscate] on enums

sol_ampsol_amp Posts: 5 New member
edited June 12, 2021 10:35AM in SmartAssembly
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

Answers

Sign In or Register to comment.