HotCRC内的HexToBase4096()源码(菜农自创邮件编码)
菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.htmlfunction HexToBase4096(hexstr) {
var str,ptr,ch,uncodestr;
var i, j, num;
uncodestr = "";
for(i = 0;i < hexstr.length; i+=6) {//三个字节
str = hexstr.substr(i, 6);
str = StringLeft0(str, 6);
ptr = str.substr(2, 1);
ptr += str.substr(0, 2);
num = hextoint(ptr);
num += 0xae00;
ptr = inttohex(num, 4);
uncodestr += HexToHotCode(ptr);
ptr = str.substr(3, 1);
ptr += str.substr(4, 2);
num = hextoint(ptr);
num += 0xae00;
ptr = inttohex(num, 4);
uncodestr += HexToHotCode(ptr);
}
return uncodestr;
}
https://bbs.21ic.com/data/attachment/forum/202309/22/101124qp474qggq7ix7pjx.jpg.thumb.jpg
页:
[1]