IsTrialGenuine static method

int IsTrialGenuine()

It verifies whether trial has started and is genuine or not.

Returns LexStatusCodes LA_OK, LA_TRIAL_EXPIRED, and LA_FAIL.

The verification is done locally by verifying the cryptographic digital signature fetched at the time of trial activation. This function must be called on every start of your program during the trial period. Note: This function is only meant for verified trials.

The function throws a LexActivatorException on error.

Implementation

static int IsTrialGenuine() {
  int status = _lexActivatorNative.IsTrialGenuine();
  switch (status) {
    case LexStatusCodes.LA_OK:
      return LexStatusCodes.LA_OK;
    case LexStatusCodes.LA_TRIAL_EXPIRED:
      return LexStatusCodes.LA_TRIAL_EXPIRED;
    case LexStatusCodes.LA_FAIL:
      return LexStatusCodes.LA_FAIL;
    default:
      throw LexActivatorException(status);
  }
}