Please find the executable at:
http://pan.baidu.com/s/1eQGOu34
import java.math.BigInteger; import java.util.Date; import java.util.Random; import java.util.zip.CRC32; public class Keygen { /** * @param s * @param i * @param bytes * @return */ public static short getCRC(String s, int i, byte bytes[]) { CRC32 crc32 = new CRC32(); if (s != null) { for (int j = 0; j < s.length(); j++) { char c = s.charAt(j); crc32.update(c); } } crc32.update(i); crc32.update(i >> 8); crc32.update(i >> 16); crc32.update(i >> 24); for (int k = 0; k < bytes.length - 2; k++) { byte byte0 = bytes[k]; crc32.update(byte0); } return (short) (int) crc32.getValue(); } /** * @param biginteger * @return String */ public static String encodeGroups(BigInteger biginteger) { BigInteger beginner1 = BigInteger.valueOf(0x39aa400L); StringBuilder sb = new StringBuilder(); for (int i = 0; biginteger.compareTo(BigInteger.ZERO) != 0; i++) { int j = biginteger.mod(beginner1).intValue(); String s1 = encodeGroup(j); if (i > 0) { sb.append("-"); } sb.append(s1); biginteger = biginteger.divide(beginner1); } return sb.toString(); } /** * @param i * @return */ public static String encodeGroup(int i) { StringBuilder sb = new StringBuilder(); for (int j = 0; j < 5; j++) { int k = i % 36; char c; if (k < 10) { c = (char) (48 + k); } else { c = (char) ((65 + k) - 10); } sb.append(c); i /= 36; } return sb.toString(); } /** * @param name * @param days * @param id * @param prtype * @return */ public static String makeKey(String name, int days, int id) { id %= 100000; byte bkey[] = new byte[12]; bkey[0] = (byte) 1; // Product type: IntelliJ IDEA is 1 bkey[1] = 14; // version Date d = new Date(); long ld = (d.getTime() >> 16); bkey[2] = (byte) (ld & 255); bkey[3] = (byte) ((ld >> 8) & 255); bkey[4] = (byte) ((ld >> 16) & 255); bkey[5] = (byte) ((ld >> 24) & 255); days &= 0xffff; bkey[6] = (byte) (days & 255); bkey[7] = (byte) ((days >> 8) & 255); bkey[8] = 105; bkey[9] = -59; bkey[10] = 0; bkey[11] = 0; int w = getCRC(name, id % 100000, bkey); bkey[10] = (byte) (w & 255); bkey[11] = (byte) ((w >> 8) & 255); BigInteger pow = new BigInteger( "89126272330128007543578052027888001981", 10); BigInteger mod = new BigInteger("86f71688cdd2612ca117d1f54bdae029", 16); BigInteger k0 = new BigInteger(bkey); BigInteger k1 = k0.modPow(pow, mod); String s0 = Integer.toString(id); String sz = "0"; while (s0.length() != 5) { s0 = sz.concat(s0); } s0 = s0.concat("-"); String s1 = encodeGroups(k1); s0 = s0.concat(s1); return s0; } public static String getKey(String name) { Random r = new Random(); return makeKey(name, 0, r.nextInt(100000)); } }
相关推荐
主要介绍了IntelliJ IDEA2020.1 Mac maven sdk 全局配置,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
给Jetbrains IntelliJ IDEA安装SVN插件 给Jetbrains IntelliJ IDEA,PhpStorm,WebStorm,Pycharm,CLion
JetBrains Intellij IDEA新建JAVA Web项目教程 一步一步的具体步骤.zip
JetBrains 2020.3.x 试用30天
用Jetbrains Intellij IDEA新建SSM项目的具体步骤教程(一步一步的)
用Jetbrains Intellij IDEA新建java控制台项目(application)+使用第三方库.jar包.zip
在JetBrains IntelliJ IDEA,PHPStorm,WebStorm,Pycharm,CLion等中 用正则表达式 替换查找内容
Intellij2020.1版本可以使用,先安装官方最新版本,然后做文件替换即可,替换路径为:C:\Users\xxxx\AppData\Roaming\JetBrains\IntelliJIdea2020.1\plugins\MyBatisCodeHelper-Pro\lib 使用方法请参看博客:...
因为直接下载下来的代码不能直接导入到IDEA,这个是可以直接导入的:打开IDEA,File->New->Project From Existing Sources…,选中Spring-framework文件夹,OK->Import project from external model,选中Gradle,...
Jetbrains IntelliJ IDEA,PhpStorm,WebStorm,Pycharm,CLion批量修改多行代码的方法 输入一次文字,多行代码改变. 不是查找替换哟!
JetBrainsMono-2.242字体
IDEA_JDK_64=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.3\jbr (我的是有2019.3升级到2020.1的,) 转 https://stackoverflow.com/questions/61145290/intellij-idea-doesnt-start-cannot-load-
JetBrains IntelliJ IDEA,PhpStorm,WebStorm,Pycharm,CLion中文件查找功能失效,明明有文件就是查不到 的解决办法.zip
常用web开发工具 JetBrains PhpStorm 2019.zip.baiduyun.p常用web开发工具 JetBrains PhpStorm 2019.zip.baiduyun.p常用web开发工具 JetBrains PhpStorm 2019.zip.baiduyun.p常用web开发工具 JetBrains PhpStorm ...
IntelliJ IDEA 2020.1.2 (Ultimate Edition) Build #IU-201.7846.76, built on June 1, 2020 Licensed to IntelliJ IDEA Evaluator Expiration date: July 10, 2020 Runtime version: 11.0.7+10-b765.53 x86_64 VM: ...
用于JetBrains IntelliJ IDEA的Quarkus集成 该插件为JetBrains IntelliJ IDEA添加了功能,以更好地集成 ,并使它的行为类似于“常规IntelliJ IDEA应用程序”。 这意味着该插件将自动执行所有必要的构建步骤,并在...
D:\JetBrains\IntelliJ IDEA 2020.3.3\plugins\maven\lib\maven3\conf 目录下(你自己PC中IntelliJ IDEA实际安装目录) 替换原文件 重启IntelliJ IDEA即可 实测目前IntelliJ IDEA2020.3.3最问题,推荐使用。 如更新...
赢:C:\ Users $ USER \ AppData \ Roaming \ JetBrains \ IntelliJIdea2020.3 \ inspection Mac:〜/ Library / Preferences / IntelliJIdea15(已过期) Linux:〜/ .config / JetBrains / IntelliJIdea2020.3 /...
JetBrains IntelliJ ...生成,安装和运行Flatpak(本地)假设安装了flatpak , flatpak-builder和git ,然后执行以下命令: $ git clone https://github.com/flathub/com.jetbrains.IntelliJ-IDEA-Community.git$ cd ...
主要介绍了JetBrains IntelliJ IDEA 2020安装与使用教程,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下