for i := 1 to Long do
begin
Temp := pchar(copy(AStrPass, i, 1));
c := Temp^;
if c in ['A'..'Z'] then
c := chr(ord(c) + 32);
Pass := Pass + (ord(c) xor long) + (ord(c) and long);
end;
function GetPassword(AStrPass: string): integer; {******************************************************* 描述:密码转换函数 版本: V1.0 日期:2002-11-01 作者: 胡建平 更新: TODO:密码转换函数 *******************************************************} var Temp: pchar; c: char; i, long, Pass: integer; begin Pass :=0; long := Length(AStrPass); for i :=1to Long do begin Temp := pchar(copy(AStrPass, i, 1)); c := Temp^; if c in ['A'..'Z'] then c := chr(ord(c) +32); Pass := Pass + (ord(c) xor long) + (ord(c) and long); end; Result := Pass; end;