'Make a completely dynamic password and let the same password generate different results
'Password AAA is calculated for the first time and the result is:
'Jlce1d65ec3b91556234879c9db8f6da1123
'Second time:
'Hjmnbe0d01cc1fbd3e18ae7431fa52fb3ce4
'Third time:
'Grttb05901915e121d83ebefad7e809ef1b0
'......
'Of course, you can also restore the comparison
'The following code is modified based on the MD5 function of the mobile network,
'================================================
'= String to be encrypted by word
'= Return encrypted word
'= Example: Response. Write md6 ("AAA ")
'================================================
Function md6 (word)
Dim random, randomnum, rerandom, reword
Randomize
Do While Len (random) <4' generates a 4-digit lowercase letter
Randomnum = CHR (25 * RND + 97)
Random = random & randomnum
Loop
Rerandom = MD5 (random) 'md5 (4-digit instant letter)
Reword = MD5 (Word) 'md5 (encrypted character)
Md6 = lcase (random & MD5 (rerandom + reword) 'md6 = lower-case (4-digit lowercase letter & MD5 (4-digit instant letter + MD5 (encrypted character ))
End Function
'================================================
'= String to be verified by wrod, the original string encrypted by oldword
'= Returns the comparison result. If the result is equal, true is returned. Otherwise, false is returned.
'= 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