RT,前几天朋友发过一个apk 看了一下是根据设备id进行注册的。。然后今天分析了一下 始终没找到加密算法,求大大们解惑 其加密方式及注册机写法 谢谢了。
public static String a(byte[] paramArrayOfByte)
{
StringBuilder localStringBuilder = new StringBuilder(paramArrayOfByte.length * 2);
for (int i = 0; i < paramArrayOfByte.length; i++)
{
localStringBuilder.append(a[((paramArrayOfByte[i] & 0xF0) >>> 4)]);
localStringBuilder.append(a[(paramArrayOfByte[i] & 0xF)]);
}
return localStringBuilder.toString();
}
public class a
{
private static final char[] a = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 };
public static String a(InputStream paramInputStream)
{
String str = "";
byte[] arrayOfByte = new byte['?'];
MessageDigest localMessageDigest;
try
{
localMessageDigest = MessageDigest.getInstance("MD5");
for (;;)
{
int i = paramInputStream.read(arrayOfByte);
if (i <= 0) {
break;
}
localMessageDigest.update(arrayOfByte, 0, i);
}
return paramInputStream;
}
catch (Exception paramInputStream)
{
paramInputStream.printStackTrace();
paramInputStream = str;
}
for (;;)
{
paramInputStream = a(localMessageDigest.digest());
}
}