PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
KeyCalcActivationKey (Function)
In french: CléCalculeCléActivation
Calculates the activation key of application from the initial key. The initial key was generated by KeyGenerateInitialKey. This activation key is unique.
Note: In most cases, this function is used on the computer of the application provider: the client supplies the initial key and the provider calculates (and transmits) the corresponding activation key.
Versions 24 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 24
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Example
// 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)
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)
IF gbActivationOK = False THEN
Error("Wrong activation key")
EndProgram()
END
// 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> = KeyCalcActivationKey(<Initial Key> [, <Secret>])
<Result>: Character string
Unique activation key corresponding to the initial key.
<Initial Key>: Character string (with quotes)
Initial key supplied by the client of the application. This key was generated by KeyGenerateInitialKey.
<Secret>: Character string (with quotes)
Versions 20 and later
Encryption key used to generate the activation key.
We advise you to fill this parameter so that only the application provider can generate a valid key for the application. The same value must be passed to KeyCompareKeyNote: This parameter is available from version 200051.
New in version 20
Encryption key used to generate the activation key.
We advise you to fill this parameter so that only the application provider can generate a valid key for the application. The same value must be passed to KeyCompareKeyNote: This parameter is available from version 200051.
Encryption key used to generate the activation key.
We advise you to fill this parameter so that only the application provider can generate a valid key for the application. The same value must be passed to KeyCompareKeyNote: This parameter is available from version 200051.
Related Examples:
The Key functions Unit examples (WINDEV): The Key functions
[ + ] Using the functions for calculating the activation keys of WLanguage.
Component : wd240std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment