ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns a buffer to the specified size filled with random data, that can be used with the cryptographic technologies.
Note: The returned buffer can be used as a key for encryption functions, for example.
Example
// Génération d'une clé aléatoire de 32 octets (256 bits)
CléHasard is Buffer = RandomCryptoBuffer(32)
// Cryptage avec la clé générée
MessageCrypé is Buffer = EncryptStandard(MonMessage, CléHasard)
Syntax
<Result> = RandomCryptoBuffer([<Buffer size>])
<Result>: Buffer
  • Buffer filled with random data,
  • Empty buffer if an error occurs.
<Buffer size>: Optional integer
Size (in number of bytes) of buffer to initialize (32 by default).
Remarks
  • The first call to the function can be quite long (one second or more if the size of buffer to initialize is important). Indeed, initializing the random mechanism is very complex.
  • InitRandom has no effect on the result of RandomCryptoBuffer.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help