Domino Code Fragment

Code Name*
Random Password Generator
Date*
01/25/2002
Source (or email address if you prefer)*
wade_meyer@dominomail.com
IP address:.170.253.240.1
Description*
This button code can be placed in your Journal or any view. It randomly proposes a password. If you select 'Yes' it is saved to your ini file. If 'No' then the password is dicarded.
Type*
Formula
Categories*
Security, String Handling
Implementation:
None (plug and play)
Required Client:
(none)
Server:
(none)
Limitations:
none
Comments:
Nice mix of letters and characters that alternate between left and right hands for speedy entry. Adjust password string length to suit company policy. You can scramble the QWERTY order for further complexity in the Lhand and Rhand strings.
Files/Graphics attachments (if applicable): Code:
REM "Random password generator guarenteed to give you left-right typing ease.";
REM "To increase the number of characters or decrease the number of characters you can add or delete pairs of @Middle functions.";
REM "21 characters plus one leading space for @Middle offset requirment.";
FIELD Lhand := " 123456qwertasdfgzxcvb";
REM "15 characters plus one leading space for @Middle offset requirment.";
FIELD Rhand := " 7890yuiophjklnm";
REM "@Round plus 1 for numbers that round down to 0.";
NewPassword := @Middle(Lhand;@Round(@Random*20)+1;1) + @Middle(Rhand;@Round(@Random*14)+1;1) +
@Middle(Lhand;@Round(@Random*20)+1;1) + @Middle(Rhand;@Round(@Random*14)+1;1) +
@Middle(Lhand;@Round(@Random*20)+1;1) + @Middle(Rhand;@Round(@Random*14)+1;1) +
@Middle(Lhand;@Round(@Random*20)+1;1) + @Middle(Rhand;@Round(@Random*14)+1;1) ;


REM "Display the password and ask if the user wants to keep it.";
REM "If yes then write to .ini file, if no then do nothing.";
YN := @Prompt([YESNO];"Do you wish to use this as your new system password?";NewPassword);
@If(YN = 1;@Environment("password";NewPassword);@Prompt([OK];"Note";"Password not recorded."))