unit fmRSA;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, mRSA;
type
TForm1 = class(TForm)
MemoCodiert: TMemo;
MemoVerschluesselt: TMemo;
MemoEntschluesselt: TMemo;
BeendenButton: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ButtonEntschluesseln: TButton;
ButtonVerschluesseln: TButton;
procedure FormCreate(Sender: TObject);
procedure BeendenButtonClick(Sender: TObject);
procedure ButtonVerschluesselnClick(Sender: TObject);
procedure ButtonEntschluesselnClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
RSA : TRSAWerkzeug;
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
RSA.Free;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RSA := TRSAWerkzeug.create(-1);
end;
procedure TForm1.BeendenButtonClick(Sender: TObject);
begin
close;
end;
procedure TForm1.ButtonVerschluesselnClick(Sender: TObject);
begin
MemoVerschluesselt.Text := RSA.verschluesselCode(MemoCodiert.Text);
end;
procedure TForm1.ButtonEntschluesselnClick(Sender: TObject);
begin
MemoEntschluesselt.Text := RSA.verschluesselCode(MemoVerschluesselt.Text);
end;
end.