Exp=z
@p1='Ҫ
@c1=
@p2=
@c2=
@va=temp_a
@vb=temp_b
@vc=temp_c
@vd=temp_d
ext=
mgs=
@end
public function boolean checkkey ();
//:CheckKey
//ĿģǷڶӦļ
//ؽ
//ؼ٣ʾδҵӦļδעע󣬷,ʾڶӦļ
//̿κεطʹüճķʽδԼĴУһҪע⣬ҪʹеļܱʽһҪԼһµļܱʽ
    
    //ֲ
    Integer a,b,c,d,result //¼ؽ
    Integer temp_a,temp_b,temp_c,temp_d
    
	byte InArray[16]
	byte DecArray []
    int n
	//칤ɵļܺļܱʽ
	//бܵıʽΪ@exp
	InArray[1]=@ak100;InArray[2]=@ak101;InArray[3]=@ak102; InArray[4]=@ak103;
	InArray[5]=@ak104;InArray[6]=@ak105;InArray[7]=@ak106; InArray[8]=@ak107;
	InArray[9]=@ak108;InArray[10]=@ak109;InArray[11]=@ak110;InArray[12]=@ak111;
	InArray[13]=@ak112;InArray[14]=@ak113;InArray[15]=@ak114;InArray[16]=@ak115;
	//ܺıʽ͵ннܲ¼ܣʹӦȨţעת
	//Ȼ󷵻ؼܺݣüܺüӦ
	//ֻбӦȨŽתݲܱӦļܲ
	for n=1 to 16
			DecArray[n]=0
	next 
	LastError=E_Dec_6(E_HKey, E_LKey, InArray, DecArray, KeyPath)
	if  LastError<> 0 then
	  return False
	end if
///////////////////////////////////////////////////////////////////////////////////////   
    
    //
    	a = rand(256)-1
	 b = rand(256)-1
	 c = rand(256)-1
	 d = rand(256)-1
    temp_a=a
    temp_b=b
    temp_c=c
    temp_d=d
    //͵ڽ㣬
    LastError=CalculateEx_2(DecArray, a, b, c, d,KeyPath,16, 2000)
    If LastError<> 0 Then
		return false
	end if
    //ڵʹô㷨ԸղŲ㣬ĽǷͬ
    @1
    //ΪܱʽҪӦĸı
	 //ͬڶӦ򣬲ڶӦļ
    If a = temp_a And b = temp_b And c = temp_c And d = temp_d Then
       return True
    End If

return false
end function
