The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



InventPassWord


Unit:SDL_filesys
Class:none
Declaration:function InventPassword (NrChars: integer): string;

The function InventPassword creates a random character combination which is easy to read, i.e. the returned string consists of vowels and consonants and two digits in an appropriate order. This function can be used to automatically create passwords. The parameter NrChars determines the length of the created password and may assume values between 4 and 14. The number of different passwords generated by the algorithm depends on the parameter NrChars :

NrChars number of generated words
4 12000
6 1.44*106
8 1.73*108
10 2.07*1010
12 2.48*1012
14 2.98*1014

Hint: Don't forget to initialize the random generator which is used for generating the random character combinations (Delphi system call "randomize")


Last Update: 2008-Okt-29