IntelliJ IDEA 14 license key gen
为什么80%的码农都做不了架构师?>>>
import java.math.BigInteger;
import java.util.Date;
import java.util.Random;
import java.util.Scanner;
import java.util.zip.CRC32;public class KeyGen {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();}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();}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();}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 1bkey[1] = 14; // versionDate 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 void main(String[] args) {System.out.println("请输入用户名:");Scanner scanner = new Scanner(System.in);String username = scanner.next();Random r = new Random();System.out.println(MakeKey(username, 0, r.nextInt(100000)));}
}
转载于:https://my.oschina.net/yerly/blog/402934
IntelliJ IDEA 14 license key gen相关推荐
- 【项目管理】IntelliJ IDEA 14/15 注册码
一.IntelliJ IDEA 15 IntelliJ IDEA 15下载地址 IntelliJ IDEA 15注册: 只需要输入本博客提供的License server即可破解.即License s ...
- IntelliJ IDEA 14 注册码
IntelliJ IDEA 14 下载地址: IntelliJ IDEA 14 下载 分享几个license: (1) key:IDEA value:61156-YRN2M-5MNCN-NZ8D2-7 ...
- IntelliJ IDEA 14注册
IntelliJ IDEA 14 下载地址: IntelliJ IDEA 14 下载 分享几个license: (1) key:IDEA value:61156-YRN2M-5MNCN-NZ8D2-7 ...
- Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
Intellij IDEA 14 作为Java IDE 神器,接触后发现,非常好用,对它爱不释手,打算离开eclipse和myeclipse,投入Intellij IDEA的怀抱. 然而在使用的过程中 ...
- linux下Intellij Idea 14的安装
一.安装配置jdk 虽然很多Linux发行版现在已经自带OpenJDK,但是在开发过程中 ...
- [Swift]LeetCode482. 密钥格式化 | License Key Formatting
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ ➤微信公众号:山青咏芝(shanqingyongzhi) ➤博客园地址:山青咏芝(https://www.cnblog ...
- 【转】Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
Intellij IDEA 14 作为Java IDE 神器,接触后发现,非常好用,对它爱不释手,打算离开eclipse和myeclipse,投入Intellij IDEA的怀抱. 然而在使用的过程中 ...
- Intellij IDEA 14 安装之后
2019独角兽企业重金招聘Python工程师标准>>> ####Intellij IDEA 14 安装之后 设置IDEA的字体 File -> Settings -> A ...
- 【原创】解决JT2Go二次开发提示license key无效问题
[原创]解决JT2Go二次开发提示license key无效问题 这东西可能对有些人来说比较有用 上几张图 关键代码 1 IntPtr bassAddr = IntPtr.Zero; 2 foreac ...
最新文章
- java arraylist 序列化_无法序列化/反序列化ArrayList
- java文件名特殊字符_如果拒绝打开文件名中带有特殊字符的文件,如何修复Java?...
- android移除动画,android – 如何使用ObjectAnimator删除动画的慢端?
- 【转】Java学习---内存溢出的排查经历
- java多线程的写法三个线程_Java多线程的几种写法
- Atitit orm的实现模式 data-mapper模式和active-record模式有什么区别
- VC遍历窗口上的控件
- python中plot不能显示标签_python 2: 解决python中的plot函数的图例legend不能显示中文问题...
- java emoji显示乱码_菜鸟笔记(一) - Java常见的乱码问题
- java中求1 2 =3,1. java dom编程艺术---杨涛、王建桥 -第3章 DOM(自总)
- Spring Cloud Alibaba RocketMQ 快速入门
- XF660R型号良田高拍仪接口开发,通过图片文件的二进制数据进行图片上传
- ASP.NET Core Razor 页面入门
- 网络口碑营销推广怎么能提高消费者的信任
- java LPT1,java 打印机打印跟开钱箱
- Java自幂数计算及其算法改进
- 如何将chrome浏览器的默认语言改成中文呢?
- POJ 1659 Frogs‘ Neighborhood (Havel 定理)
- Flink使用指南:Flink操作命令基础整理 (日常更新中...)
- Java实现莱布尼兹问题