ASP 解密函数的编写

来源:百度知道 编辑:UC知道 时间:2024/06/12 05:12:32
Function StrDecode(str)
Dim Tmp()
Tmp = Split(Str, "|")
For I = LBound(Tmp) To UBound(Tmp)
If Tmp(I) <> "" Then
StrDecode = StrDecode & Chr(Tmp(I))
End If
Next
End Function
msgbox strdecode("-10782|-18186|-13632|-16921|-13625|-14401|-10785|-19004|-13632|-16921|-23636|-15429|-11312|-15140|-15962|-23636|-15133|-10565|-17439|-12849|-19984|-14133|-19004|-17677|-12853|-24157|")

当函数执行到第三行,提示错误,类型不匹配,那段数字是密文,需要用函数解密,大概已经在函数中大家了解了,所以帮我一下,调试成功后给分,是ASP中的函数.

<%Function StrDecode(str)
Tmp = Split(str,"|")
For I = LBound(Tmp) To UBound(Tmp)
If Tmp(I) <> "" Then
StrDecode = StrDecode & Chr(Tmp(I))
End If
Next
End Function
response.write(strdecode("-10782|-18186|-13632|-16921|-13625|-14401|-10785|-19004|-13632|-16921|-23636|-15429|-11312|-15140|-15962|-23636|-15133|-10565|-17439|-12849|-19984|-14133|-19004|-17677|-12853|-24157|"))%>