相思资源网 Design By www.200059.com
<%
A_Key=split("96,44,63,80",",") '定义密钥
'*********加密的过程*********
Function EnCrypt(m)
Dim strChar,iKeyChar,iStringChar,I
k=0
for I = 1 to Len(m)
iKeyChar =Cint(A_Key(k))
iStringChar = Asc(mid(m,I,1)) '获取字符的ASCII码值
iCryptChar = iKeyChar Xor iStringChar '进行异或运算
'对密钥进行移位运算
If k<3 Then
k=k+1
Else
k=0
End If
c = c & Chr(iCryptChar)
next
EnCrypt = c
End Function
'*********解密的过程*********
Function DeCrypt(c)
Dim strChar, iKeyChar, iStringChar, I
k=0
for I = 1 to Len(c)
iKeyChar =Cint(A_Key(k))
iStringChar = Asc(mid(c,I,1))
iDeCryptChar = iKeyChar Xor iStringChar '进行异或运算
'对密钥进行移位运算
If k<3 Then
k=k+1
Else
k=0
End If
strDecrypted = strDecrypted & Chr(iDeCryptChar)
next
DeCrypt = strDecrypted
End Function
%>
A_Key=split("96,44,63,80",",") '定义密钥
'*********加密的过程*********
Function EnCrypt(m)
Dim strChar,iKeyChar,iStringChar,I
k=0
for I = 1 to Len(m)
iKeyChar =Cint(A_Key(k))
iStringChar = Asc(mid(m,I,1)) '获取字符的ASCII码值
iCryptChar = iKeyChar Xor iStringChar '进行异或运算
'对密钥进行移位运算
If k<3 Then
k=k+1
Else
k=0
End If
c = c & Chr(iCryptChar)
next
EnCrypt = c
End Function
'*********解密的过程*********
Function DeCrypt(c)
Dim strChar, iKeyChar, iStringChar, I
k=0
for I = 1 to Len(c)
iKeyChar =Cint(A_Key(k))
iStringChar = Asc(mid(c,I,1))
iDeCryptChar = iKeyChar Xor iStringChar '进行异或运算
'对密钥进行移位运算
If k<3 Then
k=k+1
Else
k=0
End If
strDecrypted = strDecrypted & Chr(iDeCryptChar)
next
DeCrypt = strDecrypted
End Function
%>
标签:
asp字符串加密解密函数
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无asp字符串加密解密函数的评论...