MyEclipse 訂閱過期後需輸入註冊碼。網上流傳的生成器本質是模擬官方授權演算法,僅供學習研究,請支持正版。
public class MyEclipseKeygen {
private static final String LL = "Decompiling this copyrighted software..."; // 固定鹽值
public String getSerial(String userId, String licenseNum) {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.YEAR, 3); // 有效期 3 年
cal.add(Calendar.DAY_OF_YEAR, -1);
String verTime = new SimpleDateFormat("yyMMdd").format(cal.getTime()) + "0";
String type = "YE3MP-";
String need = userId.substring(0, 1) + type + "300" +
String.format("%03d", Integer.parseInt(licenseNum)) + verTime;
String dx = need + LL + userId;
int suf = Math.abs(decode(dx)); // 自定義哈希
return change(need + suf); // 字元位移編碼
}
private int decode(String s) {
int i = 0;
for (char c : s.toCharArray()) i = 31 * i + c;
return i;
}
private String change(String s) {
char[] ac = new char[s.length()];
byte[] bytes = s.getBytes();
for (int i = 0; i < bytes.length; i++) {
int j = bytes[i];
if (j >= '0' && j <= '9') j = ((j - '0' + 5) % 10) + '0';
else if (j >= 'A' && j <= 'Z') j = ((j - 'A' + 13) % 26) + 'A';
else if (j >= 'a' && j <= 'z') j = ((j - 'a' + 13) % 26) + 'a';
ac[i] = (char) j;
}
return new String(ac);
}
}