desmain.pas

来自「delphi实现加密算法 CRC32-Dym.................」· PAS 代码 · 共 60 行

PAS
60
字号
unit DESMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls, DESUnit;

type
  TForm1 = class(TForm)
    StatusBar1: TStatusBar;
    Button1: TButton;
    Button2: TButton;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label7: TLabel;
    EInput: TEdit;
    EKey1: TEdit;
    EOutput: TEdit;
    EKey2: TEdit;
    GroupBox2: TGroupBox;
    Label4: TLabel;
    Label6: TLabel;
    Label5: TLabel;
    Label8: TLabel;
    DInput: TEdit;
    DOutput: TEdit;
    DKey1: TEdit;
    DKey2: TEdit;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  EOutput.Text:=DESEncrypt(DESDecrypt(DESEncrypt(EInput.Text,EKey1.Text),
                           EKey2.Text),EKey1.Text);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  DOutput.Text:=DESDecrypt(DESEncrypt(DESDecrypt(DInput.Text,EKey1.Text),
                           EKey2.Text),EKey1.Text);
end;

end.

⌨️ 快捷键说明

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