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

📄 unit1.~pas

📁 wfEncode DLL提供接口如下: strResult=EnBase64("将要加密的字符串") strResult=DeBase64("将要解密的字符串") strResult=E
💻 ~PAS
字号:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    BitBtn1: TBitBtn;
    Edit2: TEdit;
    Edit3: TEdit;
    BitBtn2: TBitBtn;
    StaticText1: TStaticText;
    StaticText2: TStaticText;
    StaticText3: TStaticText;
    StaticText4: TStaticText;
    StaticText5: TStaticText;
    StaticText6: TStaticText;
    StaticText7: TStaticText;
    StaticText8: TStaticText;
    StaticText9: TStaticText;
    edtKey: TEdit;
    StaticText10: TStaticText;
    procedure FormCreate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

  function EnBase64(strCode: PChar): PChar; Stdcall; External 'wfEncode27.dll';
  function DeBase64(strCode: PChar): PChar; Stdcall; External 'wfEncode27.dll';

  function EnDes(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';
  function DeDes(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';

  function EnDesHex(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';
  function DeDesHex(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';

  function EnWFsoft(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';
  function DeWFsoft(strCode, strKey: PChar): PChar; Stdcall; External 'wfEncode27.dll';

  function EnMD5(strCode: PChar): PChar; Stdcall; External 'wfEncode27.dll';

  function Software():PChar; Stdcall; External 'wfEncode27.dll';
  function Author():PChar; Stdcall; External 'wfEncode27.dll';
  function Version():PChar; Stdcall; External 'wfEncode27.dll';
  function Website():PChar; Stdcall; External 'wfEncode27.dll';
    
implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
   StaticText5.Caption:='Software:'+Software();
   StaticText6.Caption:='Author:'+Author();
   StaticText7.Caption:='Version:'+Version();
   StaticText8.Caption:='Website:'+Website();
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
   //Edit2.Text:=EnDes(PChar(Edit1.Text),PChar(edtKey.Text));
   Edit2.Text:=EnDesHex(PChar(Edit1.Text),PChar(edtKey.Text));

   //Edit2.Text:=EnWFsoft(PChar(Edit1.Text),PChar(edtKey.Text));

   //Edit2.Text:=EnBase64(PChar(Edit1.Text));

   //Edit2.Text:=EnMD5(PChar(Edit1.Text));
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
   //Edit3.Text:=DeDes(PChar(Edit2.Text),PChar(edtKey.Text));
   Edit3.Text:=DeDesHex(PChar(Edit2.Text),PChar(edtKey.Text));

   //Edit3.Text:=DeWFsoft(PChar(Edit2.Text),PChar(edtKey.Text));

   //Edit3.Text:=DeBase64(PChar(Edit2.Text));
end;

end.

⌨️ 快捷键说明

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