There are a number of obfuscation tools for .NET code available on the market, as can be seen on the MSDN C# Programming Tools page, for example. In order to successfully obfuscate yFiles.NET-based applications, a suitable tool needs to meet the following requirements:
The yFiles.NET diagramming library has been prepared so that obfuscation tools that lack support for generic types and methods, which are used intensively throughout the library, should work as well. Specifically, this includes Dotfuscator Software Services Community Edition (CE) that comes with Visual Studio 2010.
Dotfuscator Commercial Edition, in contrast, provides dedicated support for generic types and methods and thus presents the better choice when obfuscating a yFiles.NET-based application, especially when the application itself also uses generic types and methods.
When obfuscating a yFiles.NET-based application using a member of the Dotfuscator product family, for example, a sample XML configuration file to obfuscate the yFiles.NET part would look like that shown in Example A.3, “A sample Dotfuscator configuration file”.
Example A.3. A sample Dotfuscator configuration file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE dotfuscator
SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.1.dtd">
<dotfuscator version="2.1">
<!-- Input: yFiles.NET assemblies, application executable. -->
<input>
<asmlist>
<inputassembly>
<option>honoroas</option>
<option>stripoa</option>
<file dir=".\build" name="myApplication.exe" />
</inputassembly>
<!-- From the following list of yFiles.NET assemblies only those that
are actually part of the licensed distribution need to be
included. -->
<inputassembly>
<option>honoroas</option><!-- Required. -->
<option>stripoa</option><!-- Optional. -->
<file dir=".\lib" name="yWorks.yFilesNET.Algorithms.dll" />
</inputassembly>
<inputassembly>
<option>honoroas</option><!-- Required. -->
<option>stripoa</option><!-- Optional. -->
<file dir=".\lib" name="yWorks.yFilesNET.Viewer.dll" />
</inputassembly>
<inputassembly>
<option>honoroas</option><!-- Required. -->
<option>stripoa</option><!-- Optional. -->
<file dir=".\lib" name="yWorks.yFilesNET.Adapter.dll" />
</inputassembly>
</asmlist>
</input>
<output>
<file dir=".\dotfuscated-app" />
</output>
<tempdir>
<file dir="C:\Temp" />
</tempdir>
<renaming>
<option>keepnamespace</option>
<option>enhancedOI</option>
<excludelist>
<type name="myCompany[\.]myApplication[\.].*" regex="true">
<method name=".*" regex="true" />
<field name=".*" regex="true" />
</type>
</excludelist>
<mapping>
<mapoutput overwrite="true">
<file dir=".\" name="dotfuscation-myApplication-map.xml" />
</mapoutput>
</mapping>
</renaming>
</dotfuscator>
|
Copyright ©2006-2011, yWorks GmbH. All rights reserved. |