Encr_GeneratePassword (function reference)

By February 1, 2019 February 12th, 2019 Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in > Functions reference > Encr_GeneratePassword
Troi Encryptor Plug-in for FileMaker Pro

Encr_GeneratePassword

Generates a random password with the specified length.

SyntaxFunction badge

Encr_GeneratePassword( switches ; passwordLength )

Parameters

switchesmodifies the behavior of the function
passwordLengththe wanted length of the new password

Switches

Switches can be empty or one or more of the following:

-AddSymbolsalso use these symbol characters: "!@#$%^&*?+"
-ExcludeSimilarCharsdon’t use these similar characters: "il1oO0"

You can also add one of these 2 switches:

-NoDashesdon’t add dashes to the password
-DashesEvery=xevery x character of the password is a dash character, "-"

Returned Result

Data type returned

Text

Result

The generated password or an error code.

Returned error codes can be:

$$-50Parameter error

Originated in

Troi Encryptor Plug-in 5.0

Compatibility

FileMaker Pro 14 to 17

Considerations

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 8 characters for example is no longer considered safe.

Example

Set Variable [ $Password ; Encr_GeneratePassword ( "-Unused" ; 20 ) ]

This will generate a random password, for example “H9u4pj-oTLTbq-AQyLOS”.

Example 2

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#”.

Related functionsFunction badge

Encr_DecryptAES
Encr_EncryptAES
Encr_SavePasswordToKeychain

Related script stepScript step badge

Save Password to Keychain

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 14 to 17 –> Encr_GeneratePassword (encrp4326) 2019-0212 17:40:09