PreEmptive Dotfuscator renaming namespace System.Security.Cryptography.SHA1CryptoServiceProvider RRS feed

  • Question

  • Hi,

    i have a c# project that i obfuscate with dotfuscator . I use the rename feature. After dotfuscating all code is nicely renamed BUT only classes references from namespace System.Security.Cryptography for example SHA1CryptoServiceProvider are NOT renamed... 

    for example , in the code below the class instance MD5CryptoServiceProvider is not renamed:

       internal static string d(string A_0)
          int num1 = 1;
          if (num1 == 0)
          MD5CryptoServiceProvider cryptoServiceProvider1 = new MD5CryptoServiceProvider();
          byte[] hash = cryptoServiceProvider1.ComputeHash(Encoding.UTF8.GetBytes(SecurityHelper.a));
          TripleDESCryptoServiceProvider cryptoServiceProvider2 = new TripleDESCryptoServiceProvider();
          cryptoServiceProvider2.Key = hash;
          cryptoServiceProvider2.Padding = PaddingMode.PKCS7;
          num1 = -21642;
          int num2 = num1;
          num1 = -21642;
          int num3 = num1;
          switch (num2 == num3 ? 1 : 0)
            case 0:
            case 2:
              goto label_0;
              num1 = 0;
              if (num1 == 0)
              num1 = 0;
              return base64String;

    Anybody experiences with solving this ?



    Monday, July 29, 2019 6:31 AM

All replies

  • Hi michel,

    Thank you for posting here.

    Since this thread is more related to dotfuscator, it is a third-party tool. Therefore, I suggest that you could ask in the following link to get support.


    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Note:This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 30, 2019 1:45 AM
  • Hi Jack,

    Thanks for the response. But since Dotfuscator community is shipped with Visualstudio i think this is a gray area case ... Besides that there is no free support for the dotfuscator community edition  i can't find the community forum for this anywhere.

    Hoping somebody can help me out here.



    Tuesday, July 30, 2019 4:24 AM
  • I am only guessing here, but I have a suspicion: Given that the behavior of cryptography can be configured at runtime from the .config file, it is possible that this is implemented internally by means of reflection. Therefore, it would break if the classes were renamed. Maybe Dotfuscator is "clever" about it and this is why it is not renaming these classes.
    Tuesday, July 30, 2019 9:17 AM