这是一段JS函数,需要把它转换为C#或者VB.NET在winform中运行,只要能够在winform获取return的结果就好了!
e.extend({
Token: function(e) {
var t = Array();
e += cb;
var r, i, s, o, d, v, m, g, y, b = 7,
w = 12,
E = 17,
S = 22,
x = 5,
T = 9,
N = 14,
C = 20,
k = 4,
L = 11,
A = 16,
O = 23,
M = 6,
_ = 10,
D = 15,
P = 21;
e = p(e),
t = c(e),
v = 1732584193,
m = 4023233417,
g = 2562383102,
y = 271733878;
for (r = 0; r < t.length; r += 16) i = v,
s = m,
o = g,
d = y,
v = u(v, m, g, y, t[r + 0], b, 3614090360),
y = u(y, v, m, g, t[r + 1], w, 3905402710),
g = u(g, y, v, m, t[r + 2], E, 606105819),
m = u(m, g, y, v, t[r + 3], S, 3250441966),
v = u(v, m, g, y, t[r + 4], b, 4118548399),
y = u(y, v, m, g, t[r + 5], w, 1200080426),
g = u(g, y, v, m, t[r + 6], E, 2821735955),
m = u(m, g, y, v, t[r + 7], S, 4249261313),
v = u(v, m, g, y, t[r + 8], b, 1770035416),
y = u(y, v, m, g, t[r + 9], w, 2336552879),
g = u(g, y, v, m, t[r + 10], E, 4294925233),
m = u(m, g, y, v, t[r + 11], S, 2304563134),
v = u(v, m, g, y, t[r + 12], b, 1804603682),
y = u(y, v, m, g, t[r + 13], w, 4254626195),
g = u(g, y, v, m, t[r + 14], E, 2792965006),
m = u(m, g, y, v, t[r + 15], S, 1236535329),
v = a(v, m, g, y, t[r + 1], x, 4129170786),
y = a(y, v, m, g, t[r + 6], T, 3225465664),
g = a(g, y, v, m, t[r + 11], N, 643717713),
m = a(m, g, y, v, t[r + 0], C, 3921069994),
v = a(v, m, g, y, t[r + 5], x, 3593408605),
y = a(y, v, m, g, t[r + 10], T, 38016083),
g = a(g, y, v, m, t[r + 15], N, 3634488961),
m = a(m, g, y, v, t[r + 4], C, 3889429448),
v = a(v, m, g, y, t[r + 9], x, 568446438),
y = a(y, v, m, g, t[r + 14], T, 3275163606),
g = a(g, y, v, m, t[r + 3], N, 4107603335),
m = a(m, g, y, v, t[r + 8], C, 1163531501),
v = a(v, m, g, y, t[r + 13], x, 2850285829),
y = a(y, v, m, g, t[r + 2], T, 4243563512),
g = a(g, y, v, m, t[r + 7], N, 1735328473),
m = a(m, g, y, v, t[r + 12], C, 2368359562),
v = f(v, m, g, y, t[r + 5], k, 4294588738),
y = f(y, v, m, g, t[r + 8], L, 2272392833),
g = f(g, y, v, m, t[r + 11], A, 1839030562),
m = f(m, g, y, v, t[r + 14], O, 4259657740),
v = f(v, m, g, y, t[r + 1], k, 2763975236),
y = f(y, v, m, g, t[r + 4], L, 1272893353),
g = f(g, y, v, m, t[r + 7], A, 4139469664),
m = f(m, g, y, v, t[r + 10], O, 3200236656),
v = f(v, m, g, y, t[r + 13], k, 681279174),
y = f(y, v, m, g, t[r + 0], L, 3936430074),
g = f(g, y, v, m, t[r + 3], A, 3572445317),
m = f(m, g, y, v, t[r + 6], O, 76029189),
v = f(v, m, g, y, t[r + 9], k, 3654602809),
y = f(y, v, m, g, t[r + 12], L, 3873151461),
g = f(g, y, v, m, t[r + 15], A, 530742520),
m = f(m, g, y, v, t[r + 2], O, 3299628645),
v = l(v, m, g, y, t[r + 0], M, 4096336452),
y = l(y, v, m, g, t[r + 7], _, 1126891415),
g = l(g, y, v, m, t[r + 14], D, 2878612391),
m = l(m, g, y, v, t[r + 5], P, 4237533241),
v = l(v, m, g, y, t[r + 12], M, 1700485571),
y = l(y, v, m, g, t[r + 3], _, 2399980690),
g = l(g, y, v, m, t[r + 10], D, 4293915773),
m = l(m, g, y, v, t[r + 1], P, 2240044497),
v = l(v, m, g, y, t[r + 8], M, 1873313359),
y = l(y, v, m, g, t[r + 15], _, 4264355552),
g = l(g, y, v, m, t[r + 6], D, 2734768916),
m = l(m, g, y, v, t[r + 13], P, 1309151649),
v = l(v, m, g, y, t[r + 4], M, 4149444226),
y = l(y, v, m, g, t[r + 11], _, 3174756917),
g = l(g, y, v, m, t[r + 2], D, 718787259),
m = l(m, g, y, v, t[r + 9], P, 3951481745),
v = n(v, i),
m = n(m, s),
g = n(g, o),
y = n(y, d);
var H = h(v) + h(m) + h(g);
return H.toLowerCase()
}
------解决思路----------------------
这有什么..用VB中的ScriptControl控件.
直接扔这段代到放到里面运行....控件即可返回结果.
------解决思路----------------------
刚从曹版那里知道,可以执行
**********************************************************************************************************
可以借助ScriptControl运行js代码,不用转换了
http://www.oksvn.com/Article/Detail-15.shtml
**********************************************************************************************************
以上来自:
http://bbs.csdn.net/topics/390931579