Spermatid v6.1.8版本的 MD5 值为:a375ce51a42d528ba6e2583c10478296
以下内容为反编译后的 a.java 源代码,内容仅作参考
package ub;
import android.annotation.SuppressLint;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import androidx.exifinterface.media.ExifInterface;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
public class a {
public static class C1389a implements Comparator<Map.Entry<String, String>> {
@Override
public int compare(Map.Entry<String, String> entry, Map.Entry<String, String> entry2) {
return entry.getKey().toString().compareTo(entry2.getKey());
}
}
public static String a(byte[] bArr) {
StringBuffer stringBuffer = new StringBuffer();
for (byte b10 : bArr) {
String hexString = Integer.toHexString(b10 & ExifInterface.MARKER);
if (hexString.length() == 1) {
stringBuffer.append("0");
}
stringBuffer.append(hexString);
}
return stringBuffer.toString();
}
@SuppressLint({"NewApi"})
public static String b(Map<String, String> map, boolean z10, boolean z11) {
try {
ArrayList<Map.Entry> arrayList = new ArrayList(map.entrySet());
Collections.sort(arrayList, new C1389a());
Uri.Builder buildUpon = Uri.parse("http://www.google.com").buildUpon();
for (Map.Entry entry : arrayList) {
String str = (String) entry.getKey();
String str2 = (String) entry.getValue();
if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2)) {
buildUpon.appendQueryParameter(str, str2);
}
}
String replace = buildUpon.toString().replace("http://www.google.com?", "").replace("*", "%2A").replace("%20", "+");
return replace != null ? replace : "";
} catch (Exception e10) {
Log.d("test", "sign.formatmap.e=" + e10.toString());
return null;
}
}
public static String c(String str) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
messageDigest.update(str.getBytes("UTF-8"));
return a(messageDigest.digest());
} catch (UnsupportedEncodingException e10) {
e10.printStackTrace();
return "";
} catch (NoSuchAlgorithmException e11) {
e11.printStackTrace();
return "";
}
}
public static String d(String str) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
messageDigest.update(str.getBytes("UTF-8"));
return a(messageDigest.digest());
} catch (NoSuchAlgorithmException e10) {
e10.printStackTrace();
return "";
} catch (Exception e11) {
e11.printStackTrace();
return "";
}
}
}