Java Method-Level Protection

You can use the General tab to provide method-level protection for Java applications.

Method-level protection and licensing can be used exclusively or together with class-level protection. (The protection type Method level or Method level & Class level must be selected on the General tab.) Periodic background checks can be performed for whichever protection type (class-level, method-level, or both) you select for the application.

NOTE    

When only a subset of methods in a Java application are protected, the application may run even if the Sentinel HL key is not connected. The key is only checked when a protected method is called. Similarly, the background checks only start when the first protected method is called. If you want to prevent any use of the application when the Sentinel HL key is not connected, be sure to protect a method that is called as part of the startup of the application

The methods selected by default for protection are not optimized. See Optimizing Protection Settings for Performance and Security.

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

In this topic:

>Methods Available for Protection

>Method Properties

>Supported Web Servers

Methods Available for Protection

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

The parameters in this pane relate to methods contained in the package displayed.

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

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 methods to restrict the entries displayed. To filter the list, you can 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 java executable

Actions that affect individual 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 methods or that affect the entire list

You can select or clear the check boxes for all items in a class or package 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 also select multiple methods by selecting multiple rows. Hold down the Ctrl key while you click each row.

Locking elements

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

Selecting/clearing a class or the entire package does 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 package, right-click the appropriate row and then click Lock class or Lock package.

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, in addition to the global Feature ID assigned to the java executable. 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. This means that the license check is performed once for each Feature ID for each protected method. The license is checked again for the cache-expired protected method.

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.

String encryption

Whether to enable string encryption for the class or method. Available values are:

>No encryption - Do not encrypt strings.

>Single encryption - Encrypt strings once.

>Multiple encryption - Encrypt strings more than once.

Cache expiration

The number of seconds for which a class object that is generated at run-time is cached.

(The generated class object contains the protected method.) After the time elapses, the object is re-created. Possible values are 10-3600 seconds.

Code Obfuscation

If selected, obfuscate the entire code of the selected methods.

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.

>A binary protected with code obfuscation may require the -noverify flag at runtime.

>Code obfuscation can be only applied for private methods, not for other method identifiers.

Symbol Obfuscation

If selected, obfuscate the symbols of the selected items and generates an OMAP file for the obfuscated symbols. For details, see Sentinel Exception Report Translator.

Supported Web Servers

For a list of supported web servers for Java applications with method-level protection, see the Sentinel LDK Release Notes (for Sentinel EMS or Sentinel LDK-EMS).

Related Topics

Defining Java Program Protection Details

Java Class-Level Protection

Protection Details

Optimizing Protection Settings for Performance and Security

Protecting J2EE Applications