首页 > 其他 > 详细

侠物语破解算法

时间:2014-06-27 17:50:40      阅读:295      评论:0      收藏:0      [点我收藏+]


private function decode(data:ByteArray):ByteArray{
var dest:ByteArray = new ByteArray();
var index:int;
var key:String = "I‘m a big big girl with a big big hole";
var count:int;
var i:int;
while (i < data.length) {
if (index>= key.length){
index = 0;
count++;
if (count >= 40){
dest.writeBytes(data, (40 * key.length), (data.length - (40 * key.length)));
break;
};
};
dest.writeByte((data[i] - key.charCodeAt(index)));
i++;
index++;
};
dest.position = 0;
return dest;
}

private var key:String = ‘helloworld‘;
private function decode2(src:ByteArray, type:int):ByteArray{
var dest:ByteArray = new ByteArray();
var index:int;
var count:int;
var i:int;
while (i < src.length) {
if (index >= key.length){
index = 0;
count++;
if (count >= 50){
dest.writeBytes(src, (50 * key.length), (src.length - (50 * key.length)));
break;
};
};
if (type == 0){
dest.writeByte((src[i] + key.charCodeAt(index)));
} else {
if (type == 1){
dest.writeByte((src[i] - key.charCodeAt(index)));
};
};
i++;
index++;
};
dest.position = 0;
return (dest);
}

侠物语破解算法,布布扣,bubuko.com

侠物语破解算法

原文:http://www.cnblogs.com/zc22/p/3809965.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!