Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
GeneratePassword (Function)
In french: GénèreMotdePasse
Automatically generates a password with specific characteristics (size, characters used, ...).
// Generate a password with 8 characters
sPwd is string = GeneratePassword(8)
// Generate a password containing vowels only
sPwd2 is string = GeneratePassword(8, "aeiouyAEIOUY")
// Generate a password with all the characters from the alphabet + numbers
MySet is string = "abcdefghijklmnopqrstuvwxyz0123456789"
sPwd3 is string = GeneratePassword(8, MySet)
<Result> = GeneratePassword(<Length> [, <Set of characters>])
<Result>: Character string
  • Generated password.
  • Empty string ("") if the length of the password corresponds to 0.
<Length>: Integer
Size of the password. If this parameter is set to 0, the password corresponds to an empty string ("").
<Set of characters>: Optional character string
Characters that must be included in the password.
If this parameter is not specified, the generated password will be "pronounceable". This password is composed of characters:
  • between a and z.
  • between A and Z.
  • between 0 and 9.
Related Examples:
WM Password Cross-platform examples (WINDEV Mobile): WM Password
[ + ] Web sites, bank accounts, ... passwords are everywhere in out life. With WM Password, no need to store all the passwords of your different accounts. The application stores all your passwords in a secure way. WM Password can also generate secure passwords for you.
Component: wd290std.dll
Minimum version required
  • Version 18
This page is also available for…
Video Gerar Senha Windev
28 Dec. 2018

Last update: 06/22/2023

Send a report | Local help