title: How To Create A Decryption Function For This RC4 Algorithm
body: <p>I pulled this code for ASP from <a href="http://personalsources.com/includes/functions.asp" rel="nofollow">http://personalsources.com/includes/functions.asp</a> and its encode all password into RC4 , the function of encoding is :</p>
  
  <pre><code>function rc4(byref thestr, byref thekey)
    dim asciiarray(255)
    dim keyarray(255)
    if isnull(thestr) then exit function
    if len(thekey)=0 then exit function
    if len(thestr)=0 then thestr=" "
    if len(thestr)=0 then exit function
    zxlen=len(thekey)
    for ipos=0 To 255
      keyarray(ipos)=asc(mid(thekey, ((ipos) Mod (zxlen)) + 1, 1))
    next
    for ipos=0 To 255
      asciiarray(ipos)=ipos
    next
    vpos=0
    for ipos=0 To 255
      vpos=(vpos + asciiarray(ipos) + keyarray(ipos)) Mod 256
      tempa= asciiarray(ipos)
      asciiarray(ipos)=asciiarray(vpos)
      asciiarray(vpos)=tempa
    next
    ipos=0
    vpos=0
    for rcx=1 To len(thestr)
      ipos=(ipos + 1) Mod 256 
      vpos=(vpos + asciiarray(ipos)) Mod 256
      tempb=(asciiarray(ipos) + asciiarray(vpos)) Mod 256
      tempa=asciiarray(ipos)
      asciiarray(ipos)=asciiarray(vpos)
      asciiarray(vpos)=tempa
      tempc=asciiarray(tempb)
      rc4=rc4 &amp; chr(asc(mid(thestr, rcx, 1)) xor tempc)
    next
  end function
  </code></pre>
  
  <p>you know if we have the key of encryption (RC4) so we can decrypt the password very easily , but i dont know how this function encrypt password ? and what is the exact algorithm of this function ? is this possible to write a function to decrypt this RC4 password ? </p>
  
  <hr>
  
  <p>for example a encryption password by this function is like this (and its never like RC4 passwords!!!) : </p>
  
  <pre><code>&amp;gt;r&amp;#178;&amp;#231;&amp;#197;&amp;#197;
  </code></pre>