<%'****************************************'程序设计:阿米 EMAIL:beyong2001@sina.com'2004年11月3日'****************************************function tEncode(t1,t2)if t1<>"" and t2<>"" then Encode="" for i=1 to len(t2) s1=Mid(t2,i,1) s1=asc(s1) j=i mod len(t1) if j=0 then j=len(t1) end if s2=mid(t1,j,1) s2=asc(s2) s3=s1 xor s2 s3=cstr(s3) tEncode=tEncode+s3+"$" nextend ifend function
function tDecode(t1,t2)if t1<>"" and t2<>"" then tDecode="" str="" l=0 for i=1 to len(t2) s1=Mid(t2,i,1) if s1="$" then l=l+1 j=l mod len(t1) if j=0 then j=len(t1) end if s2=mid(t1,j,1) s2=asc(s2) s3=int(str) xor s2 s3=chr(s3) tDecode=tDecode+s3 str="" else str=str+s1 end if nextend ifend function%>