翰林优商.apk(点击下载) / m.java


package com.baidu.liantian.x0.a;

import android.text.TextUtils;
import com.mbridge.msdk.foundation.same.report.e;
import com.sigmob.sdk.base.mta.PointType;
import java.security.MessageDigest;

/* compiled from: MD5Util */
public final class m {
    private static final String[] a = {"0", "1", "2", "3", "4", "5", "6", "7", "8", PointType.SIGMOB_ERROR, "a", "b", "c", "d", e.a, "f"};

    /* JADX DEBUG: Failed to insert an additional move for type inference into block B:0:0x0000 */
    /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: byte */
    /* JADX DEBUG: Multi-variable search result rejected for r3v1, resolved type: int */
    /* JADX DEBUG: Multi-variable search result rejected for r3v5, resolved type: int */
    /* JADX WARN: Multi-variable type inference failed */
    private static String a(byte b) {
        if (b < 0) {
            b += 256;
        }
        int i = (b == true ? 1 : 0) / 16;
        StringBuilder sb = new StringBuilder();
        String[] strArr = a;
        sb.append(strArr[i]);
        sb.append(strArr[b % 16]);
        return sb.toString();
    }

    public static String a(byte[] bArr) {
        StringBuffer stringBuffer = new StringBuffer();
        for (byte b : bArr) {
            stringBuffer.append(a(b));
        }
        return stringBuffer.toString();
    }

    public static String a(String str) {
        Throwable th;
        String str2 = null;
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        try {
            String str3 = new String(str);
            try {
                return a(MessageDigest.getInstance("MD5").digest(str3.getBytes()));
            } catch (Throwable th2) {
                th = th2;
                str2 = str3;
            }
        } catch (Throwable th3) {
            th = th3;
            e.a(th);
            return str2;
        }
    }
}