⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umain.pas

📁 dycrypt text by elgamal algorithm
💻 PAS
字号:
unit Umain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtDlgs;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    Edit2: TEdit;
    Label2: TLabel;
    OpenDialog1: TOpenDialog;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { D閏larations priv閑s }
  public
    { D閏larations publiques }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.execute then Begin
 Edit1.Text:=OpenDialog1.FileName;
 if Copy(Edit1.Text,Length(Edit1.Text)-2,3)<>'X0R'
 then Edit2.Text:=Edit1.Text+'.X0R'
 else Edit2.Text:=Copy(Edit1.Text,1,Length(Edit1.Text)-4);
 end;

end;

procedure TForm1.Button2Click(Sender: TObject);
Var
  i,
  Rw:Longint;
  F,O : File;
  Buff: array[0..512-1] of Byte ;

begin
  if Not FileExists(Edit1.Text) then Exit;

  AssignFile(F,Edit1.Text);
  ReSet(F,1);

  AssignFile(O,Edit2.Text);
  ReWrite(O,1);

  Repeat
     BlockRead(F,Buff,SizeOf(Buff),Rw);
     For i:=1 to Rw DO Buff[i] := Buff[i] Xor i ;
     BlockWrite(O,Buff,Rw,Rw);
  Until Rw=0;

  CloseFile(O);
  CloseFile(F);

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -