Add support for [ForceObfuscate] on enums
sol_amp
Posts: 5 New member
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
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
Hope you are well!
Any confirmation that you have received this post would be much appreciated!
Many thanks!
S
Any feedback on my feature suggestion would be nice?
Many thanks
Best regards
S