function generate_editplus_regcode(username)
{
var list = [0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8000,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16000,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32000,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];
var hexchars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];
var regcode = new Array(29);
var i = 0, j = 0, k = 0;
var len, temp, sum, result;
username = username.replace(/^\s+|\s+$/g, ""); for(i = 0;i < 5;i++,k++)
{
for(j = 0;j < 5;j++,k++)
{
regcode[k] = hexchars[parseInt(Math.random() * 16)];
}
if(k == 29) break;
regcode[k] = '-';
} len = username.length; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = (parseInt( (sum + 23) / 6 ) + 3) * 7 % 16;
regcode[6] = hexchars[temp & 0xF]; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = parseInt( (3 * sum + 39) / 8 ) % 16;
regcode[9] = hexchars[temp & 0xF]; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = parseInt( (3 * sum + 19) / 9 ) % 16;
regcode[7] = hexchars[temp & 0xF]; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = parseInt( (sum + 10) / 3 ) * 8 % 16;
regcode[10] = hexchars[temp & 0xF]; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = (parseInt( (9 * sum + 10) / 3 ) + 36) % 16;
regcode[4] = hexchars[temp & 0xF]; sum = 1;
for(i = 0;i < len;i++)
sum += username.charCodeAt(i);
temp = parseInt( (5 * sum + 11) / 5 ) % 16;
regcode[8] = hexchars[temp & 0xF]; result = 0;
for(i = 0;i < len;i++)
result = ((result >> 8) & 0xFF) ^ list[username.charCodeAt(i) ^ (result & 0xFF)];
result = result.toString(16).toUpperCase();
regcode[2] = result.charAt(0);
regcode[3] = result.charAt(1); len = regcode.length;
result = 0;
for(i = 2;i < len;i++)
result = ((result >> 8) & 0xFF) ^ list[regcode[i].toString().charCodeAt(0) ^ (result & 0xFF)];
result = result.toString(16).toUpperCase();
regcode[0] = result.charAt(0);
regcode[1] = result.charAt(1); return regcode.join('');
}

  

Editplus注册码生成代码的更多相关文章

  1. editplus注册码生成

    http://www.jb51.net/tools/editplus/ 主要JS代码: function generate_editplus_regcode() { var list = [0,493 ...

  2. MyEclipse 8.5 注册码 生成代码

    import java.io.*; public class MyEclipseGen { private static final String LL = "Decompiling thi ...

  3. MyEclipse8.0 注册码生成代码

    转自:http://blog.sina.com.cn/s/blog_7ad29e00010199xt.html package com.guaicaicc.register; import java. ...

  4. 分享几个能用的 editplus 注册码

    转载自: https://www.cnblogs.com/shihaiming/p/6422441.html 原文:http://host.zzidc.com/wljc/1286.html EditP ...

  5. 分享几个能用的editplus注册码/2018年序列号

    注册名:host1991 序列号:14F50-CD5C8-E13DA-51100-BAFE6     注册名:360xw    注册码:93A52-85B80-A3308-BF130-40412   ...

  6. IntelliJ IDEA 14 注册码生成java代码(转)

    https://confluence.jetbrains.com/display/IntelliJIDEA/Previous+IntelliJ+IDEA+Releases 分享几个license: ( ...

  7. Editplus 注册码

    EditPlus 是一款功能强大的文字处理软件.它可以充分的替换记事本,它也提供网页作家及程序设计师许多强悍的功能.支持 HTML.CSS.PHP.ASP.Perl.C/C++.Java.JavaSc ...

  8. Editplus注册码,汉化官方版本

    官方认证Edit+简体中文版 https://www.editplus.com/download.html EditPlus注册码在线生成 http://www.jb51.net/tools/edit ...

  9. Android注解使用之通过annotationProcessor注解生成代码实现自己的ButterKnife框架

    前言: Annotation注解在Android的开发中的使用越来越普遍,例如EventBus.ButterKnife.Dagger2等,之前使用注解的时候需要利用反射机制势必影响到运行效率及性能,直 ...

随机推荐

  1. Reactor系列(十二)window嵌套

    #java#reactor#flux#window# Flux嵌套 视频解说: https://www.bilibili.com/video/av80458406/ FluxMonoTestCase. ...

  2. Nexus2 yum插件RCE漏洞(CVE-2019-5475)

    1.漏洞简介: 安全研究员Christian August Holm Hansen在Nexus Repository Manager 2.X中披露了一个远程命令执行漏洞. 该漏洞默认具有部署权限帐户. ...

  3. [c++] 幂法求特征向量

    幂法的原理可参考此篇论文:http://d.wanfangdata.com.cn/Periodical/hnnydxxb2001Z1023 本文求解的是 3 阶矩阵最大特征值及其特征向量 下面是其 C ...

  4. java多线程的优先性问题

    多线程的优先级问题 重点:理解线程优先级的继承性.规则性.随机性 线程的优先级 在操作系统中,线程可以划分优先级,.尽可能多的给优先级高的线程分配更多的CPU资源. 线程的优先级分为1~10,有三个预 ...

  5. javase-整数变量的交换

    public class Operator { public static void main(String[] args) { int a=10; int b=20; System.out.prin ...

  6. SqlServer中union 和 union all的区别

    ⒈UNION和UNION ALL关键字都是将两个结果集合并为一个,但这两者从使用和效率上来说都有所不同.⒉对重复结果的处理:UNION在进行表链接后会筛选掉重复的数据,UNION ALL不会去除重复的 ...

  7. 链表-简单练习题1-数据结构实验之链表一:顺序建立链表 SDUT2117

    Problem Description 输入N个整数,按照输入的顺序建立单链表存储,并遍历所建立的单链表,输出这些数据. Input 第一行输入整数的个数N:第二行依次输入每个整数. Output 输 ...

  8. 使用antd List组件实现轮播图

    import { List, Avatar, Carousel } from 'antd'; import { connect } from 'dva'; import './lamp.less' c ...

  9. 使用GPU训练TensorFlow模型

    查看GPU-ID CMD输入: nvidia-smi 观察到存在序号为0的GPU ID 观察到存在序号为0.1.2.3的GPU ID 在终端运行代码时指定GPU 如果电脑有多个GPU,Tensorfl ...

  10. Express multer 文件上传

    npm multer 文件上传 Express app 范本就不写了,仅记录一下上传部分的代码. const fs = require('fs'); const express = require(' ...