java关于android 的问题,这段代码是什么意思? 15

importjava.io.PrintStream;importjava.security.MessageDigest;importjava.security.NoSuc... import java.io.PrintStream;import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MD5Util{
public MD5Util() {
}
public static String getMD5Encoding(String s)
{
byte abyte0[];
String s1;
char ac[];
abyte0 = s.getBytes();
s1 = null;
ac = (new char[] {
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null
});
byte abyte1[];
char ac1[];
int i;
MessageDigest messagedigest = MessageDigest.getInstance("MD5");
messagedigest.update(abyte0);
abyte1 = messagedigest.digest();
ac1 = new char[32];
i = 0;
_L3:
if (i < 16) goto _L2; else goto _L1
_L1:
s1 = new String(ac1);
_L4:
return s1;
_L2:
byte byte0 = abyte1[i];
int j = i * 2;
int k = byte0 >>> 4 & 0xf;
char c = ac[k];
ac1[j] = c;
int l = i * 2 + 1;
int i1 = byte0 & 0xf;
char c1 = ac[i1];
ac1[l] = c1;
i++;
goto _L3
printStackTrace();
goto _L4
}

public static void main(String args[]) {
String s = getMD5Encoding("tarena");
System.out.println(s);
StringBuffer stringbuffer = new StringBuffer();
StringBuffer stringbuffer1 = stringbuffer.append("huayins");
StringBuffer stringbuffer2 = stringbuffer.append("0779257096");
PrintStream printstream = System.out;
String s1 = getMD5Encoding(stringbuffer.toString());
printstream.println(s1);
System.out.println("=============");
StringBuffer stringbuffer3 = new StringBuffer();
StringBuffer stringbuffer4 = stringbuffer3.append("shanghai").append("huayins").append("0779257096");
StringBuffer stringbuffer5 = new StringBuffer();
StringBuffer stringbuffer6 = stringbuffer5.append("shanghai").append("changnq").append("huayins").append("0779257096");
PrintStream printstream1 = System.out;
StringBuilder stringbuilder = new StringBuilder("?????б?->");
String s2 = getMD5Encoding(stringbuffer3.toString());
String s3 = stringbuilder.append(s2).toString();
printstream1.println(s3);
PrintStream printstream2 = System.out;
StringBuilder stringbuilder1 = new StringBuilder("???б?->");
String s4 = getMD5Encoding(stringbuffer5.toString());
String s5 = stringbuilder1.append(s4).toString();
printstream2.println(s5);
StringBuffer stringbuffer7 = new StringBuffer();
StringBuffer stringbuffer8 = stringbuffer7.append("huayins").append("0779257096");
PrintStream printstream3 = System.out;
StringBuilder stringbuilder2 = new StringBuilder("???б?->");
String s6 = getMD5Encoding(stringbuffer7.toString());
String s7 = stringbuilder2.append(s6).toString();
printstream3.println(s7);
展开
 我来答
百度网友4b963fc
2013-03-23
知道答主
回答量:7
采纳率:0%
帮助的人:5.9万
展开全部
主要是关于 md5加密 的
这代码没排版
追问
能解释下这个的算法吗
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式