|  | 
 
 发表于 2015-3-31 13:14:45
|
显示全部楼层 
| function getm32str(str, timesign) { 
 return hex_md5(hex_md5(str) + timesign);
 }
 
 
 function getm16str(str, timesign) {
 
 return hex_md5(str + timesign);
 }
 
 
 function hex_md5(s) {
 return binl2hex(core_md5(str2binl(s), s.length * 8) www.gzlyhp.com);
 }
 
 function str2binl(str) {
 var bin = Array();
 var mask = (1 << 8) - 1;
 for (var i = 0; i < str.length * 8; i += 8) {
 bin[i >> 5] |= (str.charCodeAt(i / 8) & mask) << (i % 32);
 }
 return bin;
 }
 
 function md5_cmn(q, a, b, x, s, t) {
 return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
 }
 function md5_ff(a, b, c, d, x, s, t) {
 return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
 }
 function md5_gg(a, b, c, d, x, s, t) {
 return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
 }
 function md5_hh(a, b, c, d, x, s, t) {
 return md5_cmn(b ^ c ^ d, a, b, x, s, t)
 }
 function md5_ii(a, b, c, d, x, s, t) {
 return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
 }
 
 | 
 |