当前位置:K88软件开发文章中心编程语言AspAsp01 → 文章内容

asp加密解密函数decrypt

减小字体 增大字体 作者:     来源:asp编程网  发布时间:2018-12-30 8:31:16

加密与解密函数
<
%function 
decrypt(dcode) 

dim 
texts
dim 
i
for 
i=1 
to 
len(dcode)
texts=texts 

chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end 
function
function 
encrypt(ecode)
Dim 
texts
dim 
i
for 
i=1 
to 
len(ecode)
texts=texts 

chr(asc(mid(ecode,i,2))+i)
next
encrypt 

texts
end 
function
%>



<
%=decrypt(123123)%>

href="11111.asp?id=<
%=decrypt("sdfasdfs")%>
">111111111
<
%abc=encrypt(request("id"))%>
<
%=abc%>

asp加密解密函数decrypt