好友
阅读权限10
听众
最后登录1970-1-1
|
心灵之窗
发表于 2017-3-3 21:25
public function GetMD5(url:String) : String
{
var key:String = null;
var AliTimeSpan:* = 0;
var timestamp:String = null;
var date = null;
var rand:* = 0;
var txt:String = null;
var hash:IHash = null;
var data:ByteArray = null;
var ret:String = null;
var pad:* = undefined;
key = \"imgs.qikan1\";
AliTimeSpan = 1440;
timestamp = \"1432311691\";
d = new Date();
timestamp = Math.floor((d.getTime() + AliTimeSpan * 60 * 1000) / 1000).toString();
if(timestamp.length < 10)
{
pad = 10 - timestamp.length;
while(pad > 0)
{
timestamp = \"0\" + timestamp;
pad--;
}
}
rand = Math.round(Math.random() * 900000000) + 100000000;
var url:String = url.replace(\"http://\");
txt = url.substring(url.indexOf(\"/\")) + \"-\" + timestamp + \"-\" + rand + \"-0-\" + key;
hash = Crypto.getHash(\"md5\");
data = Hex.toArray(Hex.fromString(txt));
ret = Hex.fromArray(hash.hash(data)).toLowerCase();
return timestamp + \"-\" + rand + \"-0-\" + ret;
}
ActionScript代码来的
懂的人去写下载器吧下载的图片是切成一小块的,要合并图片
|
免费评分
-
查看全部评分
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|