Using Babel Obfuscator in a multi-DLL setup

Troubleshooting

Summary

When using Babel Obfuscator for .NET to obfuscate the yFiles WPF Algorithms DLL, you cannot merge the DLL with your primary application DLL. Instead, to get proper obfuscation results, you need a two-step process.

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

Using Babel Obfuscator for .NET, the basic approach to proper obfuscation of a yFiles WPF-powered application that has a multi-DLL setup with the yFiles WPF Algorithms DLL and your application's primary DLL is as follows:

  • do not merge the yFiles WPF Algorithms assembly with any other assembly
  • use an XML rules file to ensure that all yFiles public parts are obfuscated by Babel Obfuscator for .NET
  • let Babel Obfuscator produce an XML map file from the yFiles obfuscation
  • use this XML map file when obfuscating your primary application assembly

The contents of the XML rules file:

<?xml version="1.0" encoding="utf-8"?>
<!-- publicRules.xml -->
<Rules version="2.0">
  <Rule name="Obfuscate public" exclude="false">
    <Access>Public</Access>
    <Pattern isRegEx="false">*</Pattern>
    Obfuscate all public symbols.
  </Rule>
</Rules>

The yFiles WPF Algorithms assembly is obfuscated as follows, producing a map file:

babel.exe yWorks.yFilesWPF.Algorithms.dll --rules publicRules.xml --mapout yWorks.yFilesWPF.Algorithms.dll.map.xml

Using the XML mapping file generated above, your application's primary assembly is then obfuscated as follows:

babel.exe MyApplication.dll --mapin yWorks.yFilesWPF.Algorithms.dll.map.xml

This process is documented on page 118 of the Babel Obfuscator User's Guide [PDF].

Categories this article belongs to:
yFiles WPF > Licensing > Obfuscation
Applies to:
yFiles WPF: 2.2, 2.3, 2.4
Keywords:
babel - obfuscate - DLL - primary - map - rules