[独创算法] HotCRC内的Base4096ToHex()源码(菜农自创邮件编码)

[复制链接]
 楼主| hotpower 发表于 2023-9-23 10:45 | 显示全部楼层 |阅读模式
菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.html
  1.     function Base4096ToHex(hotcodestr) {
  2.                 var str, ptr, ctr, i, j, num, hexstr;
  3.                 hexstr = HotCodeToHex(hotcodestr);
  4.                 str = "";
  5.         for(i = 0;i < hexstr.length;i +=8) {
  6.                         num = hextoint(hexstr.substr(i, 4)) - 0xae00;
  7.                         ptr = inttohex(num, 4);
  8.                         ctr = ptr.substr(2, 2) + ptr.substr(1, 1);
  9.                         num = hextoint(hexstr.substr(i + 4, 4)) - 0xae00;
  10.                         ptr = inttohex(num, 4);
  11.                         ctr += ptr.substr(1, 1) + ptr.substr(2, 2);
  12.                         while(ctr.substr(ctr.length - 2, 2) == "00"){
  13.                                 ctr = ctr.substr(0, ctr.length - 2);
  14.                         }
  15.                         str += ctr;
  16.                 }
  17.                 return str;
  18.         }

您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

508

粉丝
快速回复 在线客服 返回列表 返回顶部
个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

508

粉丝
快速回复 在线客服 返回列表 返回顶部