function sunwaycode(swshop)
swbut=asc("7") '55
swput=asc("") '127
swsw1=asc("") '127
swsw2=asc("!") '33
swstr=""
for i=1 to len(swshop)
if mid(swshop,i,1)<>swstr then
sun=asc(mid(swshop,i,1))-swbut '-27
if sun>swsw1-1 then
sun=sun-swput
elseif sun<swsw2-1 then
sun=sun+swput '100
end if
swcode=swcode&chr(sun)
else
swcode=swcode&chr(13)
end if
next
sunwaycode=swcode
end function
这段函数谁能帮我改成可以自己设置内容加密的,谢谢.
參考答案:function sunwaycode(swshop, your4)
swbut=asc(your4(1))
swput=asc(your4(2))
swsw1=asc(your4(3))
swsw2=asc(your4(4))
swstr=""
for i=1 to len(swshop)
if mid(swshop,i,1)<>swstr then
sun=asc(mid(swshop,i,1))-swbut '-27
if sun>swsw1-1 then
sun=sun-swput
elseif sun<swsw2-1 then
sun=sun+swput '100
end if
swcode=swcode&chr(sun)
else
swcode=swcode&chr(13)
end if
next
sunwaycode=swcode
end function