Public Function authcode(val, operation)
dim coded, val_length, auth_key, i
coded = ""
i=0
val = strUnicode2Ansi(val)
auth_key = md5("frh4t4oAzMjHKCF"&request.ServerVariables("HTTP_USER_AGENT"))
if operation = "DECODE" then
val = base64Decode(val)
end if
val_length = lenb(val)
while i < val_length
coded = coded & mxor(midb(val,i,32), auth_key)
i = i + 32
wend
if operation = "ENCODE" then
coded = replace(base64Encode(coded), "=", "")
end if
authcode = strAnsi2Unicode(coded)
End Function
这个是现在改写的,在midb处报错