home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
207.233.110.77
/
207.233.110.77.tar
/
207.233.110.77
/
vbasic
/
Crypt-DeCrypt.asp
< prev
next >
Wrap
Text File
|
2001-10-03
|
782b
|
34 lines
<%
' This function takes a file name and/or path and encrypts it so that
' the user does not know the internal file structure of our web server
Function Crypt(strTest)
Dim strTemp
Dim x
Dim y
For x = 1 to len (strTest)
y = asc(mid(strtest,x,1))
y = y + CInt(Session("seed"))
y = y XOR 255
strTemp = strTemp & chr(y)
next 'x
' Set return value and exit function
Crypt = strTemp
End Function
' This function takes an encrypted file name and/or path and decrypts it.
Function DeCrypt(strTest)
Dim strTemp
Dim x
Dim y
For x = 1 to len (strTest)
y = asc(mid(strtest,x,1))
y = y XOR 255
y = y - CInt(Session("seed"))
strTemp = strTemp & chr(y)
next 'x
' Set return value and exit function
DeCrypt = strTemp
End Function
%>