package o;

import android.content.Context;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.security.SecureRandom;
import java.util.Arrays;
import org.json.JSONObject;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.iS, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1480iS {
    public static final /* synthetic */ int a = 0;

    static {
        byte[] bArr = new byte[32];
        new SecureRandom().nextBytes(bArr);
        long jNanoTime = System.nanoTime();
        byte[] bArrCopyOf = Arrays.copyOf(bArr, 32);
        int length = bArrCopyOf.length;
        for (int i = 0; i < length; i++) {
            bArrCopyOf[i] = (byte) (bArrCopyOf[i] ^ ((int) (255 & jNanoTime)));
            jNanoTime >>= 8;
        }
    }

    public static String a(Context context) {
        try {
            File file = new File(context.getFilesDir(), "server.txt");
            if (file.exists()) {
                String string = Za0.o0(AbstractC2008ny.J(file, AbstractC2355rh.a)).toString();
                if (string.length() > 0) {
                    return string;
                }
            }
            return Fh0.g("v1.WZhIK8JUxXQaROETcEKx6A==.S7b7bhH09wZuBLyr.D0stRgLnL93SeS7a.eyJ2IjoidjEiLCJzY2giOiIyMTA0MWNiY2I4MTNkOGIwIn0=.esixf7-DAhnXtFl2gPqmlDHk2W4iAmN0Ipc3y-lM1SvhcwWYmRXYViLNpWevfViucVH3MyPVlA98EoO0oFcHGN4kjEk2IDOIC0H9grMqerKqcSDx40B6mh_Vu7dnw3VSoeZgAXXcgBb6Xpo3J8N4xTjDEPS0g3HTlfO_6docDjeacNLsPQzi73RpLtMHiBT0mhI_WLx8NC_QhTkSDobyDI1dQGTV3FN0Tg==");
        } catch (Exception unused) {
            return null;
        }
    }

    public static String b(Context context) {
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(context.getAssets().open("webview.json"), AbstractC2355rh.a), 8192);
            try {
                String strO = As0.O(bufferedReader);
                bufferedReader.close();
                String string = Za0.o0(new JSONObject(strO).optString("webview_url", "")).toString();
                if (string.length() == 0) {
                    return null;
                }
                return Fh0.g(string);
            } finally {
            }
        } catch (Exception unused) {
            return null;
        }
    }
}
