java注册码生成代码 java用户注册代码

谁能帮忙解释一下JAVA中的那个注册码,注册机?为什么要注册码?

估计你是MyEclipse过期了吧。。。。

我们提供的服务有:成都做网站、网站设计、外贸营销网站建设、微信公众号开发、网站优化、网站认证、北镇ssl等。为上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的北镇网站制作公司

我把注册代码发给你吧:

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class a {

private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";

public String getSerial(String userId, String licenseNum) {

java.util.Calendar cal = java.util.Calendar.getInstance();

cal.add(1, 3);

cal.add(6, -1);

java.text.NumberFormat nf = new java.text.DecimalFormat("000");

licenseNum = nf.format(Integer.valueOf(licenseNum));

String verTime = new StringBuilder("-").append(

new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))

.append("0").toString();

String type = "YE3MP-";

String need = new StringBuilder(userId.substring(0, 1)).append(type)

.append("300").append(licenseNum).append(verTime).toString();

String dx = new StringBuilder(need).append(LL).append(userId)

.toString();

int suf = this.decode(dx);

String code = new StringBuilder(need).append(String.valueOf(suf))

.toString();

return this.change(code);

}

private int decode(String s) {

int i;

char[] ac;

int j;

int k;

i = 0;

ac = s.toCharArray();

j = 0;

k = ac.length;

while (j k) {

i = (31 * i) + ac[j];

j++;

}

return Math.abs(i);

}

private String change(String s) {

byte[] abyte0;

char[] ac;

int i;

int k;

int j;

abyte0 = s.getBytes();

ac = new char[s.length()];

i = 0;

k = abyte0.length;

while (i k) {

j = abyte0[i];

if ((j = 48) (j = 57)) {

j = (((j - 48) + 5) % 10) + 48;

} else if ((j = 65) (j = 90)) {

j = (((j - 65) + 13) % 26) + 65;

} else if ((j = 97) (j = 122)) {

j = (((j - 97) + 13) % 26) + 97;

}

ac[i] = (char) j;

i++;

}

return String.valueOf(ac);

}

public a() {

super();

}

public static void main(String[] args) {

try {

System.out.println("please input register name:");

BufferedReader reader = new BufferedReader(new InputStreamReader(

System.in));

String userId = null;

userId = reader.readLine();

a myeclipsegen = new a();

String res = myeclipsegen.getSerial(userId, "5");

System.out.println("Serial:" + res);

reader.readLine();

} catch (IOException ex) {

}

}

}

这个代码,生成的注册码,一般都是3年有效期,你自己填写上,就OK了!

如何用JAVA生成注册序列号

平常我们都接触过软件注册,输入序列号、激活码、注册码、授权码;对于这些字符码到底代表什么含义不甚了解,但一般来说,这些字符码中都有几个特点:

1、唯一性,肯定是一个唯一的序列号,否则就会存在滥用的问题。

2、加密性,肯定是经过加密或者混乱的,防止大家自己生成序列号。

3、解密性,软件自身肯定可以解密,否则无法验证合法性。

4、可读性,序列号一般都比较标准,方便书写和记忆,所以一般都为数字和字母。

以下给出简单示例:

[java] view plaincopy

/**

* byte转哈希

* @param b

* @return

*/

public static String byte2hex(byte[] b) {

String hs = "";

String stmp = "";

for (int n = 0; n b.length; n++) {

stmp = Integer.toHexString(b[n] 0xFF);

if (stmp.length() == 1)

hs += ("0" + stmp);

else

hs += stmp;

}

return hs.toUpperCase();

}

/**

* 哈希转byte

* @param b

* @return

*/

public static byte[] hex2byte(byte[] b) {

if ((b.length % 2) != 0)

throw new IllegalArgumentException("长度不是偶数");

byte[] b2 = new byte[b.length / 2];

for (int n = 0; n b.length; n += 2) {

String item = new String(b, n, 2);

b2[n / 2] = (byte) Integer.parseInt(item, 16);

}

return b2;

}

intellij idea怎么填写注册

IntelliJ IDEA 14 注册码生成器 文件为Java代码 自己编译运行里面的程序输入名称然后就生成注册码了

部分工具生成的注册码:

用户: share

密钥:78689-AFOCD-P3SDN-83DEC-BQ3UC-V6UK7

用户: for

密钥:13768-8VXX0-YL2BG-YBD88-2M3HN-CAOQ5

用户: you

密钥:92843-YNXOU-106BT-53NDP-PYZPL-09TJ4

用户: open

密钥:37063-L7T6T-Q4VA6-TOJ4R-YR68J-RAKS6

用户: source

密钥:35900-IZEFE-J1Q9P-QOYIH-AJ09E-5ZP55


分享文章:java注册码生成代码 java用户注册代码
分享地址:http://ybzwz.com/article/dojgcjs.html