hi Happgv,
This is code is very interesting. I have got an error on line 8 when i made some changes and tries to run it.
Please help me,
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30491: Expression does not produce a value.
Source Error:
Line 6: sub page_Load(obj as object, e as eventargs)
Line 7:
Line 8: Response.write(Encrypt("test") & "<br>")
Line 9: Response.write(Decrypt(Encrypt("test")) & "<br>")
Line 10:
<%@ Page Language ="
VB" %>
<Script runat="server">
sub page_Load(obj as object, e as eventargs)
Response.write(Encrypt("test") & "<br>")
Response.write(Decrypt(Encrypt("test")) & "<br>")
End sub
sub Encrypt(pwdStr AS String)
Dim i
Dim Cha
For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
Encrypt = Encrypt & Chr(((Cha Xor 111) + 32) Mod 256)
Next
End sub
sub Decrypt(pwdStr As String)
Dim i
Dim Cha
For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
Decrypt = Decrypt & Chr(((Cha - 32 + 256) Mod 256) Xor 111)
Next
End sub
</Script>
<html>
<body>
</body>
</html>