能力值:
( LV2,RANK:10 )
|
-
-
2 楼
this.decrypt = function(string, key) {
if (string == "") {
return "";
}
string = xxtea_decrypt(string);
var v = stringToLongArray(string, false);
var k = stringToLongArray(key, false);
if (k.length < 4) {
k.length = 4;
}
var n = v.length - 1;
var z = v[n - 1], y = v[0];
var mx, e, p, q = Math.floor(6 + 52 / (n + 1)), sum = q * delta & 0xffffffff;
while (sum != 0) {
e = sum >>> 2 & 3;
for (p = n; p > 0; p--) {
z = v[p - 1];
mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);
y = v[p] = v[p] - mx & 0xffffffff;
}
z = v[n];
mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);
y = v[0] = v[0] - mx & 0xffffffff;
sum = sum - delta & 0xffffffff;
}
return toUTF16(longArrayToString(v, true));
}
这段不就是解密的函数吗?你是想要个C语言版本的解密函数?还是想分析一下这个加密算法啊?
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
解密不出的!!
|
|
|