Make a completely dynamic password, so that the same password produces different results
Password AAA After the first operation the result is:
Jlce1d65ec3b91556234879c9db8f6da1123
Second time:
Hjmnbe0d01cc1fbd3e18ae7431fa52fb3ce4
Third time:
Grttb05901915e121d83ebefad7e809ef1b0
... ...
Of course, the comparison can be restored
The following I based on the dynamic network MD5 function modified code,
'=======================================
' Word to encrypt the string
' Returns the encrypted word
' Example: Response.Write Md6 ("AAA")
' Www.111cn.net
'=======================================
Function Md6 (Word)
Dim Random, Randomnum, Rerandom, reword
Randomize
Do While Len (Random) < 4
Randomnum = CHR (* rnd + 97)
Random = Random & Randomnum
Loop
Rerandom = Md5 (Random)
Reword = Md5 (Word)
Md6 = LCase (Random & Md5 (Rerandom + reword))
End Function
'=======================================
' Wrod the string to be validated, Oldword the encrypted original string
' Returns the result of the comparison, if the equality returns true, and vice versa false
' Example: pwd= "AAA"
' Old_pwd= ' grttb05901915e121d83ebefad7e809ef1b0 '
' If Md6back (pwd,old_pwd) =true Then
' ... ...
'=======================================
Function Md6back (Word, Oldword)
Dim Random, Randomnum, Rerandom, reword
Random = Mid (Oldword, 1, 4)
Rerandom = Md5 (Random)
Reword = Md5 (Word)
If Oldword = Random & Md5 (rerandom + reword) Then
Md6back = True
Else
Md6back = False
End If
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.