.NET - General Parameters

The parameters described in this section relate to class constructors and methods displayed in the list of Methods available for protection.

Using the General tab, you can:

>Select specific class constructors or methods to protect (using the check box).

>Assign method properties to specific class constructors or methods. (When assigning these properties, click a row to select it. To select multiple row, hold down the Ctrl key while you click each row.)

The fields and panes that are displayed on this page are described below.

Protection type

The type of protection to be applied to the .NET assembly.

Sentinel LDK Envelope supports the following protection types:

>Method level: Selected by default. This type only uses .NET features to perform protection at method level.

>Windows shell: This type provides assembly-level protection and encrypts the entire assembly. This is only applicable for applications that run under Windows.

>Method level & Windows shell:  Combines both Method level and Windows shell protection.

NOTE    

>.NET core application assembly can only be protected using the Method level protection type.

>The "Windows shell" protection type only supports .NET core versions later than or equal to 3.0.

> In mixed-mode assemblies, Method level protection can only protect managed code. To additionally protect the native code, Method level & Windows shell must be used.

>If the protection type selected includes Windows shell, the Windows Shell Settings tab becomes accessible in the screen.

Methods available for protection

A list of classes and methods that are available for protection is displayed.

This topic describes how to use this pane to select the specific class constructors or methods that you want to protect.

NOTE   Certain limitations exist on the methods that you can select for protection.

You can click to refresh the list of displayed methods. This option is useful when the method list has changed while the project is open in Sentinel LDK Envelope.

You can filter the list of classes and methods to restrict the entries displayed. To filter the list, enter a value in the search list box above the list. Only methods with short names that include that string are displayed. You can also use the /private and /public keywords to display all the private or all the public items in the .NET assembly.

If no entries in the list are selected, executables are only protected with the global Feature ID.

NOTE   A DLL cannot be protected when the check boxes for all items in the list are clear.

Actions that affect individual constructors or methods

To view the fully-qualified name for a method, hover the mouse pointer over the method.

Select an item's check box to protect it. Each item in the list has a corresponding icon to make its type easily identifiable.

NOTE   You can only protect instance methods and entry points.

Actions that affect multiple constructors or methods or that affect the entire list

You can select or clear the check boxes for all items in a class or in the binary by selecting or clearing the check box in the appropriate entry within the hierarchy. Methods that you have locked (as described below) are not affected by this action.

You can use the Automatic method selection slider bar to automatically select method to be protected based on their size (in bytes). Slide the bar or change the value displayed to set the minimum size for automatic selection. Methods that you have locked (as described below) are not affected by this setting.

Locking elements

You can lock or unlock individual methods or entry points. You can also lock or unlock an entire classes or the entire binary. (The icon is displayed for locked items.)

Using the Automatic method selection slider bar and selecting/clearing a class or the entire binary do not change the selected or clear status for lower-level items that are locked.

To lock or unlock an item, right-click the row and then click Lock method.

To lock or unlock a class or the entire binary, right-click the appropriate row and then click Lock class.

Method properties

Highlight one or more of the protected items in the list to apply the properties described below. When you click an individual protected item, these fields display the values that were assigned for that item.

Feature ID

Assign a Feature ID to the selected methods or classes, in addition to the global Feature ID assigned to the .NET assembly. If the item is selected for envelope protection, this Feature is used for encryption and decryption. At run-time, the protected program searches for the assigned Feature ID in the Sentinel protection key.

NOTE   If your application will be distributed with Sentinel HL Basic keys, you can use only the default Feature (Feature ID 0) to protect your application.

Frequency

Determine how often a license check (that is, a login to the Feature ID and decryption) is performed. The available options and the manner in which the license is checked depend on the type of item selected. The default value is Once per program, meaning that the license check is performed once for each Feature ID for the entire .NET assembly.

NOTE    You can only change the Frequency for a method after you assign a Feature ID other than Global or 0 (the default Feature) to that method.

Symbol Obfuscation

Obfuscate the symbols of the selected items. You can obfuscate the symbols for an item even if it is not selected for envelope protection.

The available options are:

>Use global definition - Enable or disable symbol obfuscation as specified on the Protection Settings tab.

>Enabled - Enable symbol obfuscation.

>Disabled - Disable symbol obfuscation.

NOTE    You cannot select override methods, virtual methods, and methods with the property SpecialName for symbol obfuscation. By default, public methods cannot be obfuscated (although they can be forced to be obfuscated). These restrictions prevent problems that would occur if these methods were obfuscated and then overridden by an external DLL.

Code Obfuscation

Obfuscate the entire code of the selected methods. You can obfuscate the code for an item even if it is not selected for envelope protection.

NOTE    Since obfuscation may slow the performance of your program, it is not selected by default. It is recommended that you only use obfuscation for items that do not impact program performance.

Code Encryption

When not selected, specifies that the code for specific methods will not be encrypted, to prevent incompatibilities when protecting certain method types. By default, the check box is selected. It is recommended that you do not clear this check box, except on the specific recommendation of Thales Technical Support.

Related Topics

Advanced Protection Details

.NET Considerations

Limitations on Use of Methods in .NET Applications

.NET Default Protection Settings Screen

.NET Protection Details for Windows Shell