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. Intellij Idea @Autowired取消提示

    在使用mybatis的代理进行开发时 <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> ...

  2. 大众点评开源分布式监控平台 CAT 深度剖析

    一.CAT介绍 CAT系统原型和理念来源于eBay的CAL的系统,CAT系统第一代设计者吴其敏在eBay工作长达十几年,对CAL系统有深刻的理解.CAT不仅增强了CAL系统核心模型,还添加了更丰富的报 ...

  3. mybaits3.2.8 别名包扫描通配符

    <mybatis.version>3.2.8</mybatis.version><mybatis.spring.version>1.2.2</mybatis. ...

  4. Myeclipse 自定义代码自动格式化(ctrl+alt+F)

    打开如图界面:preference->java->code style->formatter下的edit... 如设设置java代码多长换行:

  5. Linux系统安装MySQL步骤及支持远程操作配置方法

    一.数据库安装(安装在/usr/local目录) 1. 压缩包拷贝到/users/lengyufang/tools 2. groupadd mysql3. useradd -r -g mysql -s ...

  6. js判断是移动端还是pc端

    运行页面的时候,执行到js会判断来自于移动端还是pc端,如果是移动端则跳转制定链接地址,这样在手机端会有额外的不必要浪费的加载时间 var browser={ versions:function(){ ...

  7. struts配置。泪奔...

    说多了都是泪啊,配置一个环境一天才搞定.不错the requested resource (/login) is not available in struts,就是找不到什么什么class.亦或th ...

  8. 关于scut使用WebService

    起初是看见官方例子里天界行的项目使用了WebService想试一下.用来做充值回调,后来发现由于版本更新已经弃用了 问了下管理员,由于天界行直接从iis服务端移植过来所以还保留了Webservice的 ...

  9. hihoCoder 1082然而沼跃鱼早就看穿了一切 (字符串处理)

    http://hihocoder.com/problemset/problem/1082 首先将字符串全部字母变成小写,不断用find查找字符串中的Marshtomp,并把每个字符变为’#‘ ,最后统 ...

  10. C# 时间戳和时间的相互转换

    时间戳定义为从格林威治时间 1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数. C#格式时间转时间戳Timestamp private in ...