OPTION BASE 0 'optimized version 12NOV2021 'change this key to whatever you like but it should be complex 'at least 30 characters long and don't lose it! To increase security, 'you could use Base64 encoding to obfuscate it in your code. 'It won't stop a determined snooper but why make it easy for them? 'Suitable B64 routines are available in this namespace CONST RC4KEY$=">4!1x4q3z4+7%4{9?5\3HhH^5$9=6@1~6,7_7|1)7'3]7[9:8<3*8S9I9l7Z1eT0r1" Function RC4$(z$) Local String o Local Integer i,j,x,y,t,t1,s(255),k(255) For i=0 To 255:s(i)=i:Next j=1:t=Len(RC4key$) For i=0 To 255 if j>t Then j=1 k(i)=Peek(Var RC4key$,j):j=j+1 Next j=0 For i=0 To 255 j=(j+s(i)+k(i)) Mod &h100 t=s(i):s(i)=s(j):s(j)=t Next i=0:j=0 For x=1 To Len(z$) i=(i+1) Mod &h100:j=(j+s(i)) Mod &h100 t1=s(i):s(i)=s(j):s(j)=t1 t=(s(i)+(s(j) Mod &h100)) Mod &h100:y=s(t) o=o+Chr$(Peek(Var z$,x) Xor y) Next RC4$="" For x=1 To Len(o) RC4$=RC4$+Hex$(Peek(Var o,x),2) Next End Function Function UnRC4$(z$) Local String c Local Integer n For n=1 To Len(z$) Step 2 c=c+Chr$(Val("&h"+Mid$(z$,n,2))) Next c=RC4$(c) For n=1 To Len(c) Step 2 UnRC4$=UnRC4$+Chr$(Val("&h"+Mid$(c,n,2))) Next End Function