IDEA注册算法
来源:互联网 发布:惊变28周结局 知乎 编辑:程序博客网 时间:2024/05/04 04:19
IntelliJ IDEA 加密算法一直没变过
128位RSA加密
import java.math.BigInteger;import java.util.Random;import java.util.zip.CRC32; static String CalcSerial(String userName) { byte[] paramArrayOfByte = {0x1, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0, 0x0, 0x71, 0x45, 0x00, 0x00}; long l = System.currentTimeMillis() >> 16; paramArrayOfByte[2] = (byte) (l & 0xff); paramArrayOfByte[3] = (byte) (l >> 8 & 0xff); paramArrayOfByte[4] = (byte) (l >> 16 & 0xff); paramArrayOfByte[5] = (byte) (l >> 24 & 0xff); CRC32 localCRC32 = new CRC32(); Random rdm = new Random(System.currentTimeMillis()); int paramInt = rdm.nextInt(); paramInt = (paramInt > 0) ? paramInt % 100000 : (0 - paramInt) % 100000; if (userName != null) { for (int i = 0; i < userName.length(); i++) { localCRC32.update(userName.charAt(i)); } } localCRC32.update(paramInt); localCRC32.update(paramInt >> 8); localCRC32.update(paramInt >> 16); localCRC32.update(paramInt >> 24); for (int i = 0; i < paramArrayOfByte.length - 2; i++) { localCRC32.update(paramArrayOfByte[i]); } long crc = localCRC32.getValue(); paramArrayOfByte[10] = (byte) crc; paramArrayOfByte[11] = (byte) (crc >> 8); BigInteger localBigInteger2 = new BigInteger(paramArrayOfByte); final BigInteger Modulus = new BigInteger("86f71688cdd2612ca117d1f54bdae029", 16); //Modulus (N) final BigInteger privateExponent = new BigInteger("430D187DE8BB3F18FB0A986E6B7163BD", 16); //Private Exponent (D) BigInteger localBigInteger1 = localBigInteger2.modPow(privateExponent, Modulus); String serial = encodeGroups(localBigInteger1); return String.format("%1$05d-", paramInt) + serial; } public static String encodeGroups(BigInteger paramBigInteger) { BigInteger localBigInteger = BigInteger.valueOf(60466176L); StringBuffer localStringBuffer = new StringBuffer(); int i = 0; while (paramBigInteger.compareTo(BigInteger.ZERO) != 0) { int j = paramBigInteger.mod(localBigInteger).intValue(); String str2 = encodeGroup(j); if (i > 0) { localStringBuffer.append("-"); } localStringBuffer.append(str2); paramBigInteger = paramBigInteger.divide(localBigInteger); i++; } String str1 = localStringBuffer.toString(); return str1; } public static String encodeGroup(int paramInt) { StringBuffer localStringBuffer = new StringBuffer(); for (int j = 0; j < 5; j++) { int k = paramInt % 36; char c; if (k < 10) { c = (char) (48 + k); } else { c = (char) (65 + k - 10); } localStringBuffer.append(c); paramInt /= 36; } return localStringBuffer.toString(); }
- IDEA注册算法
- idea注册
- idea注册
- idea 注册
- IDEA注册
- IntelliJ IDEA 13.x 注册机算法源码
- Intellij Idea注册机
- Intelli idea 注册
- IntelliJ IDEA 14注册
- idea 2016 注册
- idea编辑器注册方法
- idea注册激活
- intellij idea 注册服务器
- idea注册server
- idea注册服务器
- idea phpstorm 注册记录
- IDEA注册指南
- idea 2016 注册
- .NET平台下websocket协议的实现!
- 第四章 HTTP认证 --httpclient4 中文版帮助文档,最新官方版翻译版(四)
- 了解CMS(Concurrent Mark-Sweep)垃圾回收器
- 第五章 HTTP客户端服务 --httpclient4 中文版帮助文档,最新官方版翻译版(五)
- p,v操作例题解析--读者-写者问题--誊抄问题——睡眠理发师问题
- IDEA注册算法
- 第六章 高级主题 --httpclient4 中文版帮助文档,最新官方版翻译版(六)
- HttpClient4基础2--通过认证代理访问网页
- 【Mezzanine迁移SAE】 实现Blog example Done
- 从.Net到Java的自学笔记1:基本类型篇
- uboot对jffs2文件系统的支持
- Android RIL 架构学习总结
- 别了我的大学,别了我的兄弟们,别了我的DOTA!
- Jakarta-Common-BeanUtils使用笔记