ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Activation key functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
KeyCompareKey (Function)
In french: CléCompareClé
Compares an initial key with an activation key. The concordance between these two keys is checked: the "initial key/activation key" is only valid on a given computer.
Remark: In most cases, this function is used on the computer of the application user: the initial key is compared to the corresponding activation key supplied by the provider of the application.
Example
// Your secret to customize
Secret is string = "]$x+9*EBM%u]yK|R@=y"
// ------------------------------------
// In the application, client side
InitialKey is string
InitialKey = KeyGenerateInitialKey(ClientID)
Info("Your license key is: " + InitialKey)
 
// -> InitialKey is transmitted to the application provider
 
// --------------------------------------------
// Provider side: calculating the activation key
ActivationKey is string
Identifier is string
 
ActivationKey = KeyCalcActivationKey(InitialKey, Secret)
Identifier = KeyGetIdentifier(InitialKey)
Info("Activation key generated for the client " + Identifier + ": " + ActivationKey)
// -> ActivationKey is transmitted to the client for the activation of his license
 
//--------------------------------------------
// Client side: Entering the activation key
gbActivationOK = KeyCompareKey(InitialKey, ActivationKey, Secret)
IF gbActivationOK = False THEN
Error("Wrong activation key")
EndProgram()
END
Syntax
<Result> = KeyCompareKey(<Initial key> , <Activation key> [, <Secret>])
<Result>: Boolean
  • True if the activation key corresponds to the initial key,
  • False otherwise.
<Initial key>: Character string
Initial key supplied by the client of the application. This key was generated by KeyGenerateInitialKey.
<Activation key>: Character string
Activation key corresponding to the initial key. This activation key was generated by KeyCalcActivationKey.
<Secret>: Character string
Decryption key of the activation key. This parameter must be identical to the <Secret> parameter specified in KeyCalcActivationKey
Related Examples:
The Key functions Unit examples (WINDEV): The Key functions
[ + ] Using the functions for calculating the activation keys of WLanguage.
Component: wd290std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help