导航菜单

页面标题

页面副标题

小柿子 v1.3.8 - a.java 源代码

正在查看: 小柿子 v1.3.8 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package y1;

import android.annotation.SuppressLint;
import android.net.Uri;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.tools.SameMD5;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.windmill.sdk.WMConstants;
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 C0240a 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 b : bArr) {
            String hexString = Integer.toHexString(b & 255);
            if (hexString.length() == 1) {
                stringBuffer.append(WMConstants.FAIL);
            }
            stringBuffer.append(hexString);
        }
        return stringBuffer.toString();
    }

    @SuppressLint({"NewApi"})
    public static String b(Map<String, String> map, boolean z, boolean z4) {
        try {
            ArrayList<Map.Entry> arrayList = new ArrayList(map.entrySet());
            Collections.sort(arrayList, new C0240a());
            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 e) {
            StringBuilder sb = new StringBuilder();
            sb.append("sign.formatmap.e=");
            sb.append(e.toString());
            return null;
        }
    }

    public static String c(String str) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance(SameMD5.TAG);
            messageDigest.update(str.getBytes(C.UTF8_NAME));
            return a(messageDigest.digest());
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            return "";
        } catch (NoSuchAlgorithmException e5) {
            e5.printStackTrace();
            return "";
        }
    }

    public static String d(String str) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.update(str.getBytes(C.UTF8_NAME));
            return a(messageDigest.digest());
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
            return "";
        } catch (Exception e5) {
            e5.printStackTrace();
            return "";
        }
    }
}