Protecting DLL files from use.
I have a dll which I have written that contains code for encrypting and decrypting strings, how would I go about preventing its use by someone else who say... writes another .NET application and then attempts to include the methods from that library by referencing it?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bechir BejaouiRank #144 · 15.9K reputationPosted Sep 5, 2008, 9:10 AM EDT
System.Security;
decorate your code by this attribute
[assembly:FileIOPermission(Security.Action.RequestMinimum,Unresticted.True)|SecurityPermission(SecurityAction.RequestRefuse, SkipVerification = false)]
Rohit K29 reputationPosted Oct 26, 2008, 11:25 PM EDT
http://www.codeproject.com/KB/security/UB_CAS_NET.aspx