unit Unit1;

(**
Rose Passwords Generator
to Generate strong Passwords
by Ali Abdul Ghani(ali miracle)
mail:
blade.vp2020@gmail.com
License:
gpl v3
*)

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, RTTICtrls, Forms, Controls, Graphics, Dialogs,
  Menus;

type

  { TForm1 }

  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    MenuItem1: TMenuItem;
    MenuItem2: TMenuItem;
    MenuItem3: TMenuItem;
    MenuItem4: TMenuItem;
    TIEdit1: TTIEdit;
    procedure MenuItem2Click(Sender: TObject);
    procedure MenuItem3Click(Sender: TObject);
    procedure MenuItem4Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.MenuItem2Click(Sender: TObject);
var q1: integer;
		q2: integer;
rn: string;
rc: string;
rs: string;
		q: integer;
i: Integer; 
Count: Integer; 
    KeyStr: string;
begin
if InputQuery('Size Password','Enter Size Password',KeyStr) then

begin
count:=StrToInt(KeyStr);
rs:='';
rc:='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
rn:='0123456789';
Randomize;
for i:= 1 to Count do 
begin 
q:=1+random(32);
q1:=1+random(10);
q2:=1+random(2);
if q2<2then
insert(rn[q1],rs,1)
else
insert(rc[q],rs,1)
end;
TIEdit1.Text:=rs;
end;
end;

procedure TForm1.MenuItem3Click(Sender: TObject);
begin
        MessageDlg('Rose Passwords Generator by Ali Abdul Ghani (Ali Miracle) mail:blade.vp2020@gmail.com',mtInformation,[mbOK],0);
end;

procedure TForm1.MenuItem4Click(Sender: TObject);
begin
  Close;
end;

end.

