这是反编译后的代码,顺序什么的都有点乱,求大神帮忙看看
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class KinguoLogin {
private static Map<Integer, Character> dec_hex36Map;
private static Map<Character, Integer> hex36_decMap;
public static void main(String[] paramArrayOfString) {
System.out.println(">> ..........加密测试..........");
System.out.println(of_encrypt("02130229150719", "0602020203"));
System.out.println(of_encrypt("05610510150548", "0603050127"));
System.out.println(of_encrypt("192.168.0.65", "kingo999"));
System.out.println(of_encrypt("陕西省渭南市合阳县新池镇坡南村七组", "0603050127"));
System.out.println(">> ..........解密测试..........");
}
private static void initDec_hex36Map() {
if (dec_hex36Map == null)
dec_hex36Map = new HashMap();
int i = 0;
if (i >= 10)
;
for (int j = 0;; j++) {
if (j >= 26) {
return;
char c1 = (char) (i + 48);
dec_hex36Map.put(Integer.valueOf(i), Character.valueOf(c1));
i++;
break;
}
char c2 = (char) (j + 97);
dec_hex36Map.put(Integer.valueOf(j + 10), Character.valueOf(c2));
}
}
private static String of_dec_hex36(long paramLong) {
initDec_hex36Map();
Object localObject = "";
if (paramLong < 0L)
return "-" + of_dec_hex36(Math.abs(paramLong));
int i = (int) (paramLong % 36L);
String str = ((Character) dec_hex36Map.get(Integer.valueOf(i)))
.toString();
if ("".equals(localObject))
;
for (localObject = str;; localObject = str + (String) localObject) {
paramLong /= 36L;
if (paramLong > 0L)
break;
return localObject;
}
}
public static String of_encrypt(String paramString1, String paramString2) {
if ((paramString1 == null) || ("".equals(paramString1))
|| (paramString2 == null) || ("".equals(paramString2)))
return paramString1;
int i = paramString2.length();
int j = paramString1.length();
int k = (int) Math.ceil(1.0D * j / i);
int m = 6 * (int) Math.ceil(6.0D * (3.0D * j) / 9.0D / 6.0D) % i;
Object localObject1 = "";
int n = 0;
int i4;
String str5;
if (n >= k) {
i4 = 0;
str5 = "";
}
while (true) {
if (i4 >= ((String) localObject1).length()) {
return str5;
Object localObject2 = localObject1;
label274: for (int i1 = 1;; i1++) {
if (i1 > i)
;
for (localObject1 = localObject2;; localObject1 = localObject2) {
n++;
break;
int i2 = i1 + n * i;
String str1 = paramString1.substring(i2 - 1, i2);
String str2 = paramString2.substring(i1 - 1, i1);
int i3 = m + (Integer.valueOf(stringToAscii(str1)).intValue() + Integer.valueOf(stringToAscii(str2)).intValue());
String str3 = "000" + String.valueOf(i3);
String str4 = str3.substring(str3.length() - 3,
str3.length());
localObject2 = localObject2 + str4;
if (i2 != j)
break label274;
}
}
}
int i5 = i4;
int i6 = i5 + 9;
if (i6 >= ((String) localObject1).length())
i6 = ((String) localObject1).length();
String str6 = ((String) localObject1).substring(i5, i6);
int i7 = i4 + 9;
String str7 = "000000"
+ of_dec_hex36(Long.valueOf(str6).longValue());
String str8 = str7.substring(str7.length() - 6, str7.length());
str5 = str5 + str8;
i4 = i7;
}
}
public static String stringToAscii(String paramString) {
StringBuffer localStringBuffer = new StringBuffer();
char[] arrayOfChar = paramString.toCharArray();
int i = 0;
if (i >= arrayOfChar.length)
return localStringBuffer.toString();
if (i != arrayOfChar.length - 1)
localStringBuffer.append(arrayOfChar[i]).append(",");
while (true) {
i++;
break;
localStringBuffer.append(arrayOfChar[i]);
}
}
}
------解决思路----------------------
有点乱?首先你看看 能否正常编译
第二 你要过一下是否是你要的逻辑
------解决思路----------------------
有的可能是乱
有的也可能是作者就是加了些类似壳的逻辑 让可读性变差
------解决思路----------------------
jd-gui反编译之后 不会和原来的代码一模一样的