Hello Christiano,
> How can I prevent a third-party user from referencing the object that
> i1ve created?
>
> Strong name will prevent from diasemblying only, right??
>
> i want to avoid the user from using it... I have my password
> (de)scrambling tools inside a DLL, and don't want to let my clients to
> have access to it... Mark your assembly with a GacIdentityPermission and/or StringNameIdentityPermission
and/or a PublisherIdentityPermission.
These allow you to force other assemblies to be signed with the same Strong
Name or a Code Signing Certificate. All other calls will fail.
Though this will prevent other from normally calling your assembly, it does
not prevent disassembly. One could disassemble the assembly using a tool
like .NET Reflector (although it would not be possible to recreate the original
assembly) and one would be able to read the algorithm you've employed. So
it wouldn't be too hard to 'recreate' a similar method in a new assembly.
To protect against disassembly, you'll need to obfuscate your private assembly.
Tools like XenoCode PostBuild and WiseOwl Demeanor for .NET will allow you
to do this.
--
Jesse Houwing
jesse.houwing at sogeti.nl