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

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

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

我把让肆空注册代码发给你吧:

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 (http://www.loc.gov/copyright/legislation/dmca.pdf). 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 itpay 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了!

用文件夹内的exe替换安装目录的同名文件。

java编程词典个人版直接用文件夹内的exe替换安慧腔装目录的同名文件不需要客户获取注册码即可直接打开。

《Java编程词典(个人版)》绝肢是明日科技为Java各级程序开发人员和编程爱好者开发的专业编程资源库,它提供了海量的开发资源、丰富的实例项目、灵活的查询方式、多样的学习模式,既可以帮助零基础者快速入门,又可以帮助有一定基础者快速提升开发水平,更适合各级程序开发人员随时检索查询,随时粘贴复用。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 = 0n <b.lengthn++) {

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 = 0n <b.lengthn += 2) {

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

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

}

return b2

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/12353343.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-24
下一篇 2023-05-24

发表评论

登录后才能评论

评论列表(0条)

保存