Generates a random password with the specified length.
Encr_GeneratePassword( switches ; passwordLength )
|switches||modifies the behavior of the function|
|passwordLength||the wanted length of the new password|
Switches can be empty or one or more of the following:
|-AddSymbols||also use these symbol characters: "!@#$%^&*?+"|
|-ExcludeSimilarChars||don’t use these similar characters: "il1oO0"|
You can also add one of these 2 switches:
|-NoDashes||don’t add dashes to the password|
|-DashesEvery=x||every x character of the password is a dash character, "-"|
Data type returned
The generated password or an error code.
Returned error codes can be:
Troi Encryptor Plug-in 5.0
FileMaker Pro 16 to 19
If you supply a password length of zero a password with the default length is returned. As default the plug-in will create a password of 20 characters with dashes every 7 characters, for example “rHm8xr-jWkn6x-KXITLp”
It is advised to use a long length password, a password length of 9 characters for example is no longer considered safe. See also on Wikipedia here.
Set Variable [ $Password ; Encr_GeneratePassword ( "-Unused" ; 20 ) ]
This will generate a random password, for example “H9u4pj-oTLTbq-AQyLOS”.
Set Variable [ $Password ; Encr_GeneratePassword ( "-AddSymbols -DashesEvery=5" ; 15 ) ]
This will generate a random password with symbols and a dash every five characters, for example “9bSK-C!md-Azcf#”.
Used in example file
Related script step
|Save Password to Keychain|