惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - s3

汇编指令速查(转) C#实现VB中的asc和chr函数,字符(含中文)转ASCII 飘零网络验证-商业版3和金盾版1.5-研究中 virtualbox安装mac os x雪豹 最新的IP数据库备份 安装.net framework 4.0出错 “不信任的操作” ubuntu11.10安装redmine1.3 Fedora安装openresty Cosign安装-iis过滤模块介绍 fedora16安装mysql fedora16安装slickedit (转)SlickEdit的备份功能 (转)Slickedit的版本控制 (转)SlickEdit的按需显示 ubuntu11.10下使用slickedit16编译nginx(一) FreeBSD8.2安装GNOME(转) FreeBSD8.2安装(转) FreeBSD安装时的参考文章 Loong SSO安装部署
RC4 加密算法asp版
s3 · 2014-03-23 · via 博客园 - s3
 1 Function RC4(data, Key)
 2     Dim s(256), k(256), outstr, Acii, j, tst, xre1, xre2, temp, x, t, y, qwe, zxc
 3     For i = 1 To 256
 4         s(i) = i - 1
 5     Next
 6     j = 1
 7     For i = 1 To 256
 8         dex = dex + 1
 9         If j > Len(Key) Then
10             j = 1
11         End If
12         Acii = Asc(Mid(Key, j, 1))
13         If Acii < 0 Then
14             tst = Hex(Acii)
15             xre1 = Mid(tst, 1, 2)
16             xre2 = Mid(tst, 3, 2)
17             k(i) = Int("&H" & xre1)
18             k(i + 1) = Int("&H" & xre2)
19             i = i + 1
20         Else
21             k(i) = Acii
22         End If
23         j = j + 1
24     Next
25     j = 0
26     For i = 1 To 256
27         j = (j + s(i) + k(i)) Mod 256 + 1
28         temp = s(i)
29         s(i) = s(j)
30         s(j) = temp
31     Next
32     j = 0
33     For i = 1 To Len(data)
34         x = (x + 1) Mod 256 + 1
35         j = (j + s(x)) Mod 256 + 1
36         temp = s(x)
37         s(x) = s(j)
38         s(j) = temp
39         t = (s(x) + s(j) Mod 256) Mod 256 + 1
40         y = s(t)
41         Acii = Asc(Mid(data, i, 1))
42         If Acii < 0 Then
43             tst = Hex(Acii)
44             qwe = qwe + 1
45             If qwe >= 2 Then
46                 zxc = Int("&H" & Mid(tst, 3, 2))
47                 qwe = 0
48             Else
49                 zxc = Int("&H" & Mid(tst, 1, 2))
50                 i = i -1
51             End If
52         Else
53             zxc = Acii
54         End If
55         outstr = outstr & Bitsor(zxc, y)
56     Next
57     RC4 = outstr
58 End Function
59 
60 Function Bitsor(x, y)
61     Dim Mx, Hx, Wx
62     Mx = 0
63     Hx = 0
64     Wx = 0
65     Mx = x And y
66     Mx = Mx * 2
67     Hx = Hex(X + y - Mx)
68     If Len(Hx) > 1 Then
69         Wx = Hx
70     Else
71         Wx = "0" & Hx
72     End If
73     Bitsor = Wx
74 End Function