易截截图软件、单文件、免安装、纯绿色、仅160KB

改写了一个常用的DELPHI的加解密函数

DELPHI
//////////////////////////////////
Function   EncrypKey   (Src:String;   Key:String):string;
  var  
  idx   :integer;  
  KeyLen   :Integer;  
  KeyPos   :Integer;  
  offset   :Integer;  
  dest   :string;  
  SrcPos   :Integer;  
  SrcAsc   :Integer;  
  TmpSrcAsc   :Integer;  
  Range   :Integer;  
   
  begin  
  KeyLen:=Length(Key);  
  if   KeyLen   =   0   then   key:='Think   Space';
  KeyPos:=0;  
  SrcPos:=0;  
  SrcAsc:=0;  
  Range:=256;  
   
  Randomize;  
  offset:=Random(Range);  
  dest:=format('%1.2x',[offset]);  
  for   SrcPos   :=   1   to   Length(Src)   do  
  begin  
  SrcAsc:=(Ord(Src[SrcPos])   +   offset)   MOD   255;  
  if   KeyPos   <   KeyLen   then   KeyPos:=   KeyPos   +   1   else   KeyPos:=1;  
  SrcAsc:=   SrcAsc   xor   Ord(Key[KeyPos]);  
  dest:=dest   +   format('%1.2x',[SrcAsc]);  
  offset:=SrcAsc;  
  end;
  Result:=Dest;  
  end;  
   
  //解密函数  
  Function   UncrypKey   (Src:String;   Key:String):string


相关文档:

delphi 编写的com 对象 用php调用的实例

delphi 编写的com 对象 用php调用

实例
delphi:
function Tmyxml.Get_xml: WideString;
begin
      Get_xml:='wo shi a lei!';
end;
function Tmyxml.Get_xmldata: WideString;
var
xmlStr:string;
begin
  xmlStr := '<?xml   version="1.0" & ......

括号匹配(delphi)-转

type
TCharStack = class(TStack)
private
function GetTop: Char;
public
function Pop: Char;
function Push(Item: Char): Char;
property Top: Char read GetTop;
end;
const
FindSet = ['(',')'];

implementation
{$R *.dfm}
{ TCharStack }
......

Delphi 关键字详解

Delphi 关键字详解---absolute//它使得你能够创建一个新变量, 并且该变量的起始地址与另一个变量相同.
var
Str: string[32];
StrLen: Byte absolute Str;
//这个声明指定了变量StrLen起始地址与Str相同.
//由于字符串的第0个位置保存了字符串的长度, 所以StrLen的值即字符串长度.
begin
Str := 'abc';
Edit ......

delphi dll 静态调用和动态调用方法总结

dll 调用方法有 静态调用和动态调用两种方法
用到的dll为上篇文章所编写的dll.
总结如下:
Unit Unit1;
Interface
Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
Type
  TForm1 = Class(TForm)
    Button1: TButton; ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号