Home > DeveloperSection > Forums > Protecting dll files from use.
James Smith

Total Post:48

Posted on    April-16-2011 2:30 AM

 C# C# 

 1 Reply(s)
 1378  View(s)
Rate this:
I have a dll which I have written that contains code for encrypting and decrepting strings, how would I do about preventing its use by someone else who say writes another .net application and then attempts to include the method from that library for referncing it?

Awadhendra Tiwari

Total Post:126

Posted on    April-16-2011 3:03 AM

Make use of the  System.Security; namespace

decorate your code by this attribute
[assembly:FileIOPermission(Security.Action.RequestMinimum,Unresticted.True)|SecurityPermission(SecurityAction.RequestRefuse, SkipVerification = false)]

Don't want to miss updates? Please click the below button!

Follow MindStick