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] = 13; // 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 void main(String[] args)
{
if (args.length == 0)
{
System.err.printf("*** Usage: %s name%n", keygen.class.getCanonicalName());
System.exit(1);
}
Random r = new Random();
System.out.println(MakeKey(args[0], 0, r.nextInt(100000)));
}
}

注册机下载:Keygen.jar

IntelliJ IDEA 13 Keygen的更多相关文章

  1. [转]JetBrains IntelliJ IDEA 13 Keygen (Java Source Code)

    转载:http://www.rover12421.com/2013/12/09/jetbrains-intellij-idea-13-keygen-java-source-code.html JetB ...

  2. 使用IntelliJ IDEA 13搭建Android集成开发环境(图文教程)

    ​[声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/ ...

  3. IntelliJ IDEA 13试用手记(附详细截图)

    从去年开始转java以来,一直在寻找一款趁手的兵器,eclipse虽然是很多java程序员的首选,但是我发现一旦安装了一些插件,workspace中的项目达到数10个以后,经常崩溃,实在影响编程的心情 ...

  4. Win7系统上配置使用Intellij Idea 13的SVN插件

    Win7系统上配置使用Intellij Idea 13的SVN插件 http://blog.csdn.net/jeepxiaozi/article/details/39856081

  5. 解决IntelliJ IDEA 13更新FindBugs 0.9.993时JRE版本过低导致启动失败问题

    今晚更新FindBugs 0.9.992(FindBugs 2)至FindBugs 0.9.993(FindBugs 3)后,按要求重启IntelliJ IDEA 13.本想看看更新后多了哪些功能,结 ...

  6. intellij idea 13&14 插件推荐及快速上手建议 (已更新!)

    原文:intellij idea 13&14 插件推荐及快速上手建议 (已更新!) 早些年 在外企的时候,公司用的是intellij idea ,当时也是从eclipse.MyEclipse转 ...

  7. 图解IntelliJ IDEA 13版本对Android SQLite数据库的支持

    IntelliJ IDEA 13版本的重要构建之一是支持Android程序开发.当然对Android SQLite数据库的支持也就成为了Android开发者对IntelliJ IDEA 13版本的绝对 ...

  8. 探秘IntelliJ IDEA 13中的版本控制——Subversion 1.8

    IntelliJ IDEA 中引入的重要特性就是版本控制,而在IntelliJ IDEA 13中的体现便是支持最新的Subversion 1.8. 相对于之前版本对Subversion的支持,Subv ...

  9. 探秘IntelliJ IDEA 13测试版新功能——调试器显示本地变量

    IntelliJ IDEA在业界被公认为最好的Java开发平台之一,JetBrains公司将在12月正式发布IntelliJ IDEA 13版本. 现在,小编将和大家一起探秘密IntelliJ IDE ...

随机推荐

  1. Linux命令-tr

    tr命令用于转换文本文件中的字符 [root@localhost test]# cat .txt abcdefg asdfoui asdfqer [root@localhost test]# cat ...

  2. android eclipse——error: device not found解决办法

    device not found解决办法 http://www.blogjava.net/anchor110/articles/335866.html 问题描述:在CMD命令行,输入adb shell ...

  3. c# 获取数组中最大数的值

    求数组中最大的数的值:1.数组的max函数: class Program { static void Main(string[] args) { ,,,,,,,,,}; int max= GetMax ...

  4. 【Tech】Cassandra安装和启动

    1.安装 jre,配置系统环境变量: 2.安装python,配置环境变量: 3.下载cassandra,http://cassandra.apache.org/download/: 4.解压,这里我没 ...

  5. samba linux windows 请联系管理员

    在使用Samba进行建立Window与Linux共享时,要是不能访问,出现“您可能没有权限使用网络资源”, 那就是SELinux在作怪了 要是想让共享目录能访问,可以使用命令 #setenforce ...

  6. HTML发展历史

    概述 HTML从1993到如今的发展,同时针对其以后的发展进行评测. HTML 语言作为网络语言标准规范,在计算机的发展史中有着不可或缺的地位.在HTML 上的成就也决定着一个时代的发展. 1.HTM ...

  7. 第五讲:深入hibernate的三种状态

    学过hibernate的人都可能都知道hibernate有三种状态,transient(瞬时状态),persistent(持久化状态)以及detached(离线状态),大家伙也许也知道这三者之间的区别 ...

  8. URAL1291. Gear-wheels

    1291 不知道为嘛被分在DP里了 瞎写 注意没被别的轮带动的情况 初始为0 分母为1 #include <iostream> #include<cstdio> #includ ...

  9. [ionic开源项目教程] - 第13讲 Service层优化,提取公用Service,以及生活和农业两大模块的实现

    关注微信订阅号:TongeBlog,可查看[ionic开源项目]全套教程. 这一讲主要实现生活和农业两大模块的实现,在这个过程中,对service层提取出一个公用的BaseService. 这一讲分为 ...

  10. bootstrapValidator对于隐藏域验证和程序赋值即时验证的问题

    问题1: 如下代码: <input type="hidden" name="productId"/> $("#addForm") ...