2

Possible Duplicate:
DLL encryption without using Obfuscator

I need to send a project to a contractor that has an assembly that I want to make sure that he cannot use the reflector on, to view the code.

Is there a way to do this in .NET?

I will be using reflection in my project that interrogates the assembly to call methods. Will reflection work if the DLL is "encrypted"? Also, this will be installed by him in the GAC.

Community
  • 1
  • 1
DotnetDude
  • 11,617
  • 35
  • 100
  • 158
  • 1
    See the linked duplicate. But you're not going to prevent anyone that's determined from reverse-engineering your code. Encryption won't help, because your end-users must decrypt the DLL to use it, so you'll have to provide the decryption key and algorithm with the DLL. – Robert Harvey Dec 20 '12 at 16:27
  • The anwsers on the referenced question are weak and the question is over two years old. – Chuck Conway Dec 20 '12 at 16:27
  • @ChuckConway: There are [several duplicates](https://www.google.com/search?q=encrypting+a+dll+to+prevent). – Robert Harvey Dec 20 '12 at 16:28
  • @RobertHarvey can the "Possible Duplicate" link be changed? This question (http://stackoverflow.com/questions/9868895/dll-encryption-without-using-obfuscator) has much stronger answers. – Chuck Conway Dec 20 '12 at 16:30
  • @RobertHarvey - Also, I had other follow up questions as well. Can I use reflection on obfuscated assembly? Does it matter if the assembly is in the GAC or in the project? – DotnetDude Dec 20 '12 at 16:33
  • http://stackoverflow.com/questions/7433000/obfuscate-assembly-and-reflection. It shouldn't matter where the assembly is located. – Robert Harvey Dec 20 '12 at 16:37

0 Answers0