ASP 用のこのコードをhttp://personalsources.com/includes/functions.aspから取得し、すべてのパスワードを RC4 にエンコードします。エンコードの機能は次のとおりです。
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 & chr(asc(mid(thestr, rcx, 1)) xor tempc)
  next
end function
暗号化の鍵 (RC4) を持っているので、パスワードを非常に簡単に解読できるかどうかはわかりますが、この関数がパスワードを暗号化する方法を知りませんか? この関数の正確なアルゴリズムは何ですか? このRC4パスワードを解読する関数を書くことは可能ですか?
たとえば、この関数による暗号化パスワードは次のようになります (RC4 パスワードとは異なります!!!):
>r²çÅÅ