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
Returns a random number that can be used with the cryptographic technologies.
Versions 25 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 25
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Example
// Retrieve an integer included between 0 and 2 147 483 647
ResRandom = RandomCryptoInteger()
// Retrieve an integer included between 0 and 34
ResRandom = RandomCryptoInteger(34)
// Retrieve an integer included between 7 and 21
ResRandom = RandomCryptoInteger(7, 21)
Syntax

Calculating a random number Hide the details

<Result> = RandomCryptoInteger()
<Result>: Integer
  • Random integer (included between 0 and 2 147 483 647),
  • -1 if an error occurred.

Calculating a random number with an upper bound Hide the details

<Result> = RandomCryptoInteger(<Upper bound>)
<Result>: Integer
  • Random integer (included between 0 and the upper bound, inclusive)
  • -1 if an error occurred.
<Upper bound>: Integer
Upper bound of returned number (included between 1 and 2 147 483 647).

Calculating a random number with a lower bound and an upper bound Hide the details

<Result> = RandomCryptoInteger(<Lower bound> , <Upper bound>)
<Result>: Integer
  • Random integer (included between the lower and upper bounds, inclusive),
  • -1 if an error occurred.
<Lower bound>: Integer
Lower bound of returned number (included between 0 and 2 147 483 647)
<Upper bound>: Integer
Upper bound of returned number (included between 1 and 2 147 483 647)
Remarks
  • The first call to the function can be quite long (about one second) because initializing the random mechanism is very complex.
  • InitRandom has no effect on the result of RandomCryptoInteger.
Business / GUI classification : Neutral code
Component : wd250std.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment