Chinaunix

标题: 谁能帮我把这个JAVA加密方法转成PHP的 [打印本页]

作者: 123694401    时间: 2008-01-01 10:20
标题: 谁能帮我把这个JAVA加密方法转成PHP的
package sfol;

import common.b;
import java.util.Calendar;
import java.util.Date;
import javax.microedition.io.ConnectionNotFoundException;
import javax.microedition.lcdui.Font;

// Referenced classes of package sfol:
// SinaPalmlet

public final class z
{

public z()
{
}

static String a(String s, String s1)
{
String s2;
String s3;
String s4;
byte abyte0[];
int i;
s2 = "8UiDJfre5KgTmB45";
s3 = null;
s4 = null;
abyte0 = null;
try
{
abyte0 = s1.getBytes("UTF-8");
s4 = new String(abyte0);
}
catch(Exception _ex) { }
s3 = "";
i = 0;
goto _L1
_L9:
char c1;
char c2;
s3 = s3 + "%";
c1 = (char)(abyte0 >> 4 & 0xf);
c2 = (char)(abyte0 & 0xf);
if(c1 >= '\n') goto _L3; else goto _L2
_L2:
48;
c1;
goto _L4
_L3:
c1 - 10;
65;
_L4:
JVM INSTR iadd ;
(char);
char c3;
c3;
s3 = s3 + c3;
if(c2 >= '\n') goto _L6; else goto _L5
_L5:
48;
c2;
goto _L7
_L6:
c2 - 10;
65;
_L7:
JVM INSTR iadd ;
(char);
c3;
s3 = s3 + c3;
i++;
_L1:
if(i < abyte0.length) goto _L9; else goto _L8
_L8:
s3 = s3 + "&d=";
s3 = s3 + b.a(s2 + s + s4);
goto _L10
JVM INSTR dup ;
Exception exception;
exception;
printStackTrace();
_L10:
return s3;
}问题补充:接上:

(date);
return calendar.get(2) + 1;
}

public static int b()
{
Date date = new Date(System.currentTimeMillis());
Calendar calendar;
(calendar = Calendar.getInstance()).setTime(date);
return calendar.get(1) - 2000;
}

public static int c()
{
Date date = new Date(System.currentTimeMillis());
Calendar calendar;
(calendar = Calendar.getInstance()).setTime(date);
return calendar.get(5);
}

public static void a(String s, int i)
{
if(i == 1)
{
a(s);
return;
}
if(i == 6)
{
SinaPalmlet.f().k();
return;
}
if(i == 7)
{
SinaPalmlet.f().j();
return;
}
if(i == 9)
SinaPalmlet.f().i();
}
}
作者: phpnewbie    时间: 2008-01-01 14:34
麻烦,你先找做这个的人把思路列出来!
作者: caualex    时间: 2008-01-02 14:35
java里有goto?
作者: dy810810    时间: 2008-01-03 10:22
原帖由 caualex 于 2008-1-2 14:35 发表
java里有goto?

java里没有goto,楼主这段代码可能是c#的。
作者: 傲枭    时间: 2008-01-03 10:49
楼主的是不是反编译出来的..




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2