Exp=f
//@p1=a:= aSoft_enc_1.a;
@c1=KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
//@p2=a:= aSoft_enc_1.a;
@c2=KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
@va=a
@vb=b
@vc=c
@vd=d
@end
                                        
//YStrCat_1ãַ
//S1Ҫӵַ
//S2Ҫӵĵڶַ
//ؽӺĿַ
//KeyLastError=0ȷΪμֲ
function YStrCat_1(S1, S2: AnsiString): AnsiString;
var
  a, b, c, d: byte;
  aLen, KeyReturn: integer;
begin
  Result:= '';
  KeyLastError:= 0;
  Randomize;            //ʼ
  a:= Random(256); //ȸʼ
  b:= Random(256); //ȸʼ
  c:= Random(256); //ȸʼ
  d:= Random(256); //ȸʼ

//ȽַS1м
  if S1= '' then
    begin
    KeyLastError:= -46;  //-46ʾS1Ч
    Exit;
    end;
  aLen:= Length(S1); //ȡַS1ĳ

//ַĳȶʱиֵԱԺмܴ
  if aLen> 0 then a:= byte(S1[1]); //ȡַĵһֵa;
  if aLen> 1 then b:= byte(S1[2]); //ȡַĵڶֵb;
  if aLen> 2 then c:= byte(S1[3]); //ȡַĵֵc;
  if aLen> 3 then d:= byte(S1[4]); //ȡַĵĸֵd;

//ⲽa,b,c,d͵ڲм,
//@fļе@pλдмʽ
  KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
  if KeyReturn<> 0 then
    begin
    Result:= '';
    KeyLastError:= KeyReturn; //ô
    Exit;
    end;

//Ҫܺa,b,c,dڼӦĽ㣻
//ΪӦļô󣬾ܷԭֵ
//ҪµĽ
{$R-} //ҪλʱȡԽ
  @1
//a,b,c,dͻصַ
  if aLen> 0 then S1[1]:= Chr(a); //aֵŵַ
  if aLen> 1 then S1[2]:= Chr(b); //bֵŵַ
  if aLen> 2 then S1[3]:= Chr(c); //cֵŵַ
  if aLen> 3 then S1[4]:= Chr(d); //dֵŵַ

//ٽַS2м
  if S2= '' then
    begin
    KeyLastError:= -46;  //-46ʾS2Ч
    Exit;
    end;
  aLen:= Length(S2); //ȡַS2ĳ

//ַĳȶʱиֵԱԺмܴ
  if aLen> 0 then a:= byte(S2[1]); //ȡַĵһֵa;
  if aLen> 1 then b:= byte(S2[2]); //ȡַĵڶֵb;
  if aLen> 2 then c:= byte(S2[3]); //ȡַĵֵc;
  if aLen> 3 then d:= byte(S2[4]); //ȡַĵĸֵd;

//ⲽa,b,c,d͵ڲм,
//@fļе@pλдмʽ
  KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
  if KeyReturn<> 0 then
    begin
    Result:= '';
    KeyLastError:= KeyReturn; //ô
    Exit;
    end;

//Ҫܺa,b,c,dڼӦĽ㣻
//ΪӦļôĽ󣬾ܷԭֵ
//ҪµĽ
  @1
//{$R+} //ָָʾԽ⣬ɲøü⡣

//a,b,c,dͻصַ
  if aLen> 0 then S2[1]:= Chr(a); //aֵŵַ
  if aLen> 1 then S2[2]:= Chr(b); //bֵŵַ
  if aLen> 2 then S2[3]:= Chr(c); //cֵŵַ
  if aLen> 3 then S2[4]:= Chr(d); //dֵŵַ
//ַ
  Result:= S1+ S2;
end;
////////////////////////////////////////////////////////////////////////////////