Paip. cross-platform and cross-language custom encryption methods today are mainly used to transmit parameters between ASP and PHP system modules. for convenience, DES encryption is directly prepared without MD5 signatures .. However, DES in ASP and PHP cannot be encrypted with each other... What CBC mode and IV vector are there. I .. SyntaxHighlighter. all ()
Paip. cross-platform custom encryption method
Currently, parameters are transmitted between ASP and PHP system modules. for convenience, you do not need to use MD5 signatures.
DES encryption .. However, DES in ASP and PHP cannot be encrypted with each other... What CBC mode and IV vector are there?
. A lot of data. I still can't adjust it for a long time. forget it. write your own encryption method ..
The main method of password encryption is to replace and shift .. In addition, I want to use keys and algorithms.
Simple .. The DES algorithm is a big problem, MD, and difficult to use. PASS... Although the results are good, it is a bit complicated and difficult to rewrite.
..
Here, I have conceived the idea of encryption and encryption:
1. first reverse the string
2. cyclically add strings and KEY groups
3. the added result is converted into hexadecimal characters .. It is mainly used to save some space ..
4. the returned result is OK...
5. the decryption process can be reversed ..
Dim key_L71723
Key_L71723 = "iluvnjyn"
Dim msg
Msg = "admin"
Dim newstr
Newstr = atiEncode (msg, key_L71723)
Response. Write (newstr) 'shows that the encryption result is D7D5E2DACF
Response. Write (atiDecode (newstr, key_L71723 ))
---------------------------------------------
Function atiEncode (msg, key)
Msg = back_str (msg) 'reverse the string
Dim key_L71723
Key_L71723 = key
Key_L71723 = key_L71723 + key_L71723
Key_L71723 = key_L71723 + key_L71723
Key_L71723 = key_L71723 + key_L71723
Dim msgarr
Msgarr = str2array (msg)
Dim keyarr
Keyarr = str2array (key_L71723)
Dim newstr
Newstr = ""
'And the KEY group are added cyclically
For I = 0 to ubound (msgarr)
Dim char
Char = msgarr (I)
Dim newchar 'Int format
Newchar = asc (char) + asc (keyarr (I ))
Newchar = hex (newchar)
Newstr = newstr + cstr (newchar)
Next
AtiEncode = newstr
End function
Function atiDecode (msg, key)
Dim key_L71723
Key_L71723 = key
Key_L71723 = key_L71723 + key_L71723
Key_L71723 = key_L71723 + key_L71723
Key_L71723 = key_L71723 + key_L71723
Dim msgarr
Msgarr = str2arrayx (msg, 2)
Dim keyarr
Keyarr = str2array (key_L71723)
Dim newstr
Newstr = ""
For I = 0 to ubound (msgarr)
Dim charInt
CharInt = chn10 (msgarr (I) 'encode char
Dim newchar www.2cto.com
Newchar = chr (charInt-ascw (keyarr (I )))
Newstr = newstr + newchar
Next
Newstr = back_str (newstr)
AtiDecode = newstr
End function
Author: attilax