function hexEncode(str) dim strEncoded, i strEncoded = "" for i = 1 to Len(str) strEncoded = strEncoded + "%" + Hex(Asc(Mid(str, i, 1))) next hexEncode = strEncoded end function function hexDecode(str) dim strDecoded, i, hexValue strDecoded = "" for i = 2 to Len(str) hexValue = "" while Mid(str, i, 1) <> "%" and i <= Len(str) hexValue = hexValue + Mid(str, i, 1) i = i+1 wend strDecoded = strDecoded + chr(CLng("&h" & hexValue)) next hexDecode = strDecoded end function