asp加密解密函数decrypt
程序员文章站
2023-01-25 08:01:11
加密与解密函数 <%function decrypt(dcode) dim texts dim i for i=1...
加密与解密函数
<%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)%>
<a href="11111.asp?id=<%=decrypt("sdfasdfs")%>">111111111</a>
<%abc=encrypt(request("id"))%><%=abc%>
<%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)%>
<a href="11111.asp?id=<%=decrypt("sdfasdfs")%>">111111111</a>
<%abc=encrypt(request("id"))%><%=abc%>
上一篇: ASP 千万级数据分页的存储过程