Encryption | decryption | Chinese relaxlife.net can encrypt/decrypt Chinese/English ASP code for everyone to download, this is confidential, can be used in code encryption
Can encrypt/decrypt Chinese/English ASP code for everyone to download, this is confidential, can be used in code encryption
Function.asp
<%
Rem =================================================================
Rem = function File: function.asp
Rem = Test File: testencrypt.asp,encryptpass.asp
Rem = Description: Encrypt_pro encryption function, Decrypt_pro decryption function
Rem = revision:1.01 Beta
Rem = Author: Shong Hero (cexo255), Qiaoqui
Rem = Date:2005/04/20 03:41:10
Rem = qq:30133499,38377160
Rem = Mysite:http://www.relaxlife.net
Rem = QQ Group: 4341998
Rem = applicable: Encryption of data, or encryption of code, can be encrypted in Chinese/English and so on. Full decryption, will not appear garbled.
Rem = The next version is expected to improve: code algorithms need to rewrite, probably know more people are not very safe.
Rem =================================================================
Public Const sDefaultWHEEL1 = "abcdefghijklmnopqrstvuwxyz_1234567890qwertyuiopasd!@#$%^&* (),. ~ '-=\?/', ' fghjklzxcvbnm<>; '
Public Const sDefaultWHEEL2 = "iwehjktlzvopfg_1234567890qwerbnmqryuasdxcfghjklzxc ~ '-=\?/'" "!@#$%^&* (),. vbnm <>;TYUIOPASD "
Function Encrypt_pro (Sinput, Spassword)
Dim sWHEEL1, sWHEEL2
Dim K, C, I
Dim Sresult
sWHEEL1 = Sdefaultwheel1:swheel2 = sDefaultWHEEL2
Scramblewheels sWHEEL1, SWHEEL2, Spassword
Sresult = ""
For i = 1 to Len (sinput)
c = Mid (Sinput, I, 1)
K = InStr (1, sWHEEL1, c)
If k > 0 Then
Sresult = Sresult & Mid (sWHEEL2, K, 1)
Else
Sresult = Sresult & Addpass (C,spassword)
End If
sWHEEL1 = Leftshift (sWHEEL1): sWHEEL2 = RightShift (sWHEEL2)
Next
Encrypt_pro = Sresult
End Function
Function Decrypt_pro (Sinput, Spassword)
Dim sWHEEL1, sWHEEL2
Dim k, I, C
Dim Sresult
sWHEEL1 = Sdefaultwheel1:swheel2 = sDefaultWHEEL2
Scramblewheels sWHEEL1, SWHEEL2, Spassword
Sresult = ""
For i = 1 to Len (sinput)
c = Mid (Sinput, I, 1)
K = InStr (1, sWHEEL2, C, Vbbinarycompare)
If k > 0 Then
Sresult = Sresult & Mid (sWHEEL1, K, 1)
Else
Sresult = Sresult & Addpass (C,spassword)
&nbs