Dumzaz
03-08-2007, 02:18 PM
Hi all I need to develop a simple Delphi app - that generates passwords. Each password must be six characters long - selected randomly - and it must be alpha-numeric. Here is what I have so far. I am using an array to store the alphabets. If i can get the simple version to work, i will extend it.
Problem with mine is that it does not concatenate the string - it only returns one character
begin
Randomize;
Password := '';
for nCounter := 1 to 5 do;
begin
nIndex := Random(5) + 1;
Password := Password + Alphabets[nIndex];
end;
edtShowPassWord.Text := Password;
end;
Problem with mine is that it does not concatenate the string - it only returns one character
begin
Randomize;
Password := '';
for nCounter := 1 to 5 do;
begin
nIndex := Random(5) + 1;
Password := Password + Alphabets[nIndex];
end;
edtShowPassWord.Text := Password;
end;