我从http://personalsources.com/includes/functions.asp拉了ASP的代码和它的编码的所有密码,RC4,编码的功能是:如何创建解密功能对于这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²çÅÅ
简短的回答:rtfm;) – 2012-04-13 08:56:47
感谢特拉维斯,你怎么找到它? – user1259236 2012-04-13 08:59:21