[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Encrypt the contents using C# or VB.Net

Posted on 2006-06-04
2
Medium Priority
?
522 Views
Last Modified: 2008-02-01
Hello,

Can anyone tell me how to prevent someone looking the contents of the assembly using ILDASM utility or by any other means? This is required for me for the security purpose.

A working code will be definitely of the big help.

Thanks!
Run2004
0
Comment
Question by:run2004
2 Comments
 
LVL 5

Accepted Solution

by:
aaronfeng earned 1600 total points
ID: 16827006
Have you looked into Dotfuscastor?  You can find it under the Tool menu in Visual Studio.  It won't prevent people from looking at it, but it will just make it really really hard to figure out what the code it's doing.  If you are not familiar with Obfuscation here is some info I stole it from http://www.preemptive.com/

"Obfuscation is the technology of shrouding the facts. It's not encryption, but in the context of .NET code, it might be better. Although encryption can make your assembly completely unreadable, this methodology suffered from a classic encryption flaw, it needed to keep the decryption-key with the encrypted data. So, an automated utility could be created to decrypt the code and put it out to disk. Once that happens the fully unencrypted, unobfuscated code is in plain view."

I think obfuscation would be the way to go because encryption will be much harder.  When you encrypt something you need to decrypt it, it can be really a pain since you might have to do it on the fly.  I worked on a project where I have to decrypt stuff on that fly it was a total pain, and a super performance hit too.

Cheers,

Aaron
http://aaronfeng.blogspot.com
0
 
LVL 15

Assisted Solution

by:deepaknet
deepaknet earned 400 total points
ID: 16832062
For your requirement, obfuscation is a better choice, as Aaron also has pointed. For specific encryption techniques, check out http://www.codeproject.com/csharp/xcrypt.asp
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question