W3CHINA Blog首页    管理页面    写新日志    退出

The Neurotic Fishbowl

[asp/asp.net]加/解密函数(异或)
beyongtu 发表于 2005/1/9 15:30:29

<%'****************************************'程序设计:阿米  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%>

阅读全文(1407) | 回复(0) | 编辑 | 精华

 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 
 



The Neurotic Fishbowl

.: 公告

暂无公告...


Bloginess

«October 2026»
日一二三四五六
123
45678910
11121314151617
18192021222324
25262728293031

.: 我的分类(专题)

首页(2)
XML/XSL(0)
Javascript(1)
asp/asp.net(1)


In the Bowl

.: 最新日志

加/解密函数(异或)
苦苦摸索,总算完成中文的判断代码


.: 最新回复


The Fishkeeper
blog名称:
日志总数:2
评论数量:0
留言数量:0
访问次数:21781
建立时间:2005年1月9日



Text Me

.: 留言板

签写新留言


Other Fish in the Sea

.: 链接





站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.031 second(s), page refreshed 144857877 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号