Hasp.Login Method

Namespace: Aladdin.Hasp

Description

Logs into a Feature, which establishes a session context.

Syntax

HaspStatus Login ( Byte[] vendor_code )

Parameters

vendor_code

Bytes that contain the Vendor Code

Return Values

A HaspStatus status code.

Usage Notes

This method establishes a context to a Sentinel protection key that contains a license for the requested Feature ID.

The Feature ID must first be specified using the Hasp constructor.

If the session is idle, the License Manager releases the session after 12 hours. (The timeout for the session is displayed in the Sessions page of Admin Control Center.) When one of the following methods is called, the session is refreshed and the timeout counter is reset to 12 hours: Login, Login (With Scope), Encrypt, Decrypt, GetSize, Read, Write, GetRealTimeClock.

If the Feature license expires while the login session is active, the login session (and therefore, the application) is allowed to continue. This is due to the fact that terminating the session may result in corruption of the application output or data.

The required Vendor Codes are stored in a VendorCodes folder in your system. Without the correct Vendor Code, the method call cannot succeed.

You can open simultaneous login sessions.

NOTE   Important considerations:

>When the Login method is called for a Feature with a license type of Execution Count, Expiration Date, or Time Period, a write cycle is performed for the Sentinel protection key. Sentinel HL keys are certified to withstand a specific number of write cycles. For information on the number of write cycles for which Sentinel HL keys are certified, see the Sentinel HL Data Sheet.

>The V-Clock time is not automatically updated by the License Manager if you are using only Sentinel Licensing API to protect your application. To update the V-Clock time for a given protection key with Sentinel Licensing API, you must establish a session for the key (using the Hasp.Loginmethod). While the session is active, you can continue to update the V-Clock time by calling any of the following additional methods: Read, Write, Encrypt, Decrypt, Logout.

For more information on V-Clock, see the Sentinel LDK Software Protection and Licensing Guide.

Overloaded Methods

The following overloaded methods are provided. They differ from the method above only in the arguments that they accept.

HaspStatus Login ( String vendor_code )

Related Topics

Login (With Scope) Method

Logout Method

About XML Tags