function RandomPassword(PLen: Integer): string;
var
str: string;
begin
Randomize;
str := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ';
Result := '';
repeat
Result := Result + str[Random(Length(str)) + 1];
until (Length(Result) = PLen)
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
label1.Caption := RandomPassword(10);
end;
[DELPHI] - Generate Random Password
Suscribirse a:
Enviar comentarios (Atom)
0 comentarios:
Publicar un comentario