Click here to Skip to main content
15,898,869 members
Please Sign up or sign in to vote.
1.12/5 (3 votes)
See more:
Hi,

I want to protect my Class Library files (DLL), does not see anybody inside code from dll files,

is any posibilities to protect my dll files for encryption and decryption in .Net

please suggest me..

Thank you,
------------------
Posted
Comments
Afzaal Ahmad Zeeshan 10-Nov-15 1:28am    
Yes, you will have to see how you can make sure reverse engineering is not applicable to your code.

But, remember, the DLL code for .NET is mostly, MSIL. Which can be changed back and forth.
Mario Z 10-Nov-15 11:37am    
"you will have to see how you can make sure reverse engineering is not applicable to your code."

What do you mean by this? Can you provide any concrete example?
I'm afraid there is no way to prevent reverse engineering, you can only make it hard enough so that cracking it would take an unreasonable amount of time.

Nevertheless the OriginalGriff pointed the OP to the right direction. Also to add the following are some basic obfuscation techniques which you would want to have:
- Changing the names of the members, methods, properties, etc.
- Changing the applications control flow by transforming it into a spaghetti code.
- Hiding the method calls.

But honestly if someone has enough time and knowledge (and the right tools) he'll be able to retrieve your code no matter what.
Well it will not be 100% the same to the original C# or VB.NET or whatever, but he can come relatively close to it.

1 solution

There are a couple of things you can do to make it harder, but you can't stop people looking completely - to do that would mean that the code in the DLL wouldn't be readable by your application either!

Start by looking at obfuscation[^] - google can help you find obfuscators: Google[^]
But be aware that you can't completely protect any executable: if the processor can read it to run it, then so can a person! And it's very, very easy to put more work (and thus money) into protection than you would have saved in theft...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900