package defpackage;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.security.keystore.KeyGenParameterSpec;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.widget.ImageView;
import androidx.media3.common.ParserException;
import androidx.media3.exoplayer.rtsp.RtspMediaSource$RtspPlaybackException;
import com.hierynomus.smbj.common.SMBRuntimeException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteOrder;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.NoSuchAlgorithmException;
import java.security.ProviderException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

/* renamed from: ᵶʿᵛ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4782 implements InterfaceC1612 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public int f17765;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f17766;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public Object f17767;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public Object f17768;

    public C4782(byte b, int i) throws NoSuchAlgorithmException {
        this.f17766 = i;
        switch (i) {
            case 9:
                this.f17767 = new ByteArrayOutputStream(4096);
                try {
                    Mac mac = Mac.getInstance("HmacSHA1");
                    this.f17768 = mac;
                    this.f17765 = mac.getMacLength();
                    return;
                } catch (NoSuchAlgorithmException e) {
                    C1260.m3814(e);
                    throw null;
                }
            default:
                this.f17768 = "    ";
                this.f17767 = "type";
                this.f17765 = 3;
                return;
        }
    }

    public /* synthetic */ C4782(char c, int i) {
        this.f17766 = i;
    }

    public C4782(int i) {
        this.f17766 = 6;
        this.f17768 = new Object[i * 2];
        this.f17765 = 0;
    }

    public /* synthetic */ C4782(int i, int i2, Object obj, String str) {
        this.f17766 = i2;
        this.f17768 = obj;
        this.f17765 = i;
        this.f17767 = str;
    }

    public C4782(int i, String str, ArrayList arrayList, ArrayList arrayList2) {
        this.f17766 = 21;
        this.f17765 = i;
        this.f17767 = str;
        this.f17768 = arrayList;
    }

    public C4782(int i, C0227 c0227, String str) {
        this.f17766 = 15;
        this.f17765 = i;
        this.f17768 = c0227;
        this.f17767 = str;
    }

    public C4782(Context context) {
        this.f17766 = 10;
        context.getApplicationContext();
        this.f17768 = "_androidx_security_master_key_";
    }

    public C4782(Shader shader, ColorStateList colorStateList, int i) {
        this.f17766 = 2;
        this.f17768 = shader;
        this.f17767 = colorStateList;
        this.f17765 = i;
    }

    public C4782(ImageView imageView) {
        this.f17766 = 0;
        this.f17765 = 0;
        this.f17768 = imageView;
    }

    public C4782(CopyOnWriteArrayList copyOnWriteArrayList, int i, C2477 c2477) {
        this.f17766 = 12;
        this.f17767 = copyOnWriteArrayList;
        this.f17765 = i;
        this.f17768 = c2477;
    }

    public C4782(C0262 c0262) {
        this.f17766 = 4;
        this.f17767 = AbstractC5416.m11060(150, new C2931(this));
        this.f17768 = c0262;
    }

    public C4782(C1352 c1352) {
        this.f17766 = 16;
        this.f17768 = new AtomicInteger();
        this.f17765 = 16384;
        this.f17767 = c1352;
    }

    public C4782(InterfaceC1731 interfaceC1731) {
        this.f17766 = 3;
        ᵳᵹᵺˋ r0 = new ᵳᵹᵺˋ();
        r0.ᵿʗᵝʽ = new ᵼᵫᵧˀ(18);
        r0.ᵢˇᵭ = 3;
        this.f17767 = r0;
        this.f17768 = interfaceC1731;
        this.f17765 = 1;
    }

    public C4782(C2325 c2325) {
        this.f17766 = 14;
        this.f17767 = c2325;
    }

    public C4782(ᵨᴵᵺ r2) {
        this.f17766 = 17;
        this.f17768 = new SparseArray();
        this.f17767 = r2;
        this.f17765 = -1;
    }

    public C4782(C4900 c4900, int i) {
        this.f17766 = 5;
        this.f17768 = c4900;
        this.f17765 = i;
        this.f17767 = new C4184();
    }

    /* JADX WARN: Code restructure failed: missing block: B:100:0x01f5, code lost:
    
        if (r11 == 1) goto L112;
     */
    /* JADX WARN: Code restructure failed: missing block: B:102:0x01f8, code lost:
    
        if (r11 == 2) goto L111;
     */
    /* JADX WARN: Code restructure failed: missing block: B:103:0x01fa, code lost:
    
        r16 = (int[]) r0.ᵢˇᵭ;
        r17 = (float[]) r0.ᵿʗᵝʽ;
     */
    /* JADX WARN: Code restructure failed: missing block: B:104:0x0208, code lost:
    
        if (r10 == 1) goto L109;
     */
    /* JADX WARN: Code restructure failed: missing block: B:105:0x020a, code lost:
    
        if (r10 == 2) goto L108;
     */
    /* JADX WARN: Code restructure failed: missing block: B:106:0x020c, code lost:
    
        r0 = android.graphics.Shader.TileMode.CLAMP;
     */
    /* JADX WARN: Code restructure failed: missing block: B:108:0x0219, code lost:
    
        r0 = android.graphics.Shader.TileMode.MIRROR;
     */
    /* JADX WARN: Code restructure failed: missing block: B:109:0x021c, code lost:
    
        r0 = android.graphics.Shader.TileMode.REPEAT;
     */
    /* JADX WARN: Code restructure failed: missing block: B:110:0x021f, code lost:
    
        r11 = new android.graphics.LinearGradient(r21, r22, r26, r27, r16, r17, r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:111:0x0223, code lost:
    
        r11 = new android.graphics.SweepGradient(r8, r9, (int[]) r0.ᵢˇᵭ, (float[]) r0.ᵿʗᵝʽ);
     */
    /* JADX WARN: Code restructure failed: missing block: B:113:0x0235, code lost:
    
        if (r25 <= 0.0f) goto L125;
     */
    /* JADX WARN: Code restructure failed: missing block: B:114:0x0237, code lost:
    
        r20 = (int[]) r0.ᵢˇᵭ;
        r21 = (float[]) r0.ᵿʗᵝʽ;
     */
    /* JADX WARN: Code restructure failed: missing block: B:115:0x0246, code lost:
    
        if (r10 == 1) goto L121;
     */
    /* JADX WARN: Code restructure failed: missing block: B:117:0x0249, code lost:
    
        if (r10 == 2) goto L120;
     */
    /* JADX WARN: Code restructure failed: missing block: B:118:0x024b, code lost:
    
        r0 = android.graphics.Shader.TileMode.CLAMP;
     */
    /* JADX WARN: Code restructure failed: missing block: B:120:0x0256, code lost:
    
        r0 = android.graphics.Shader.TileMode.MIRROR;
     */
    /* JADX WARN: Code restructure failed: missing block: B:121:0x0259, code lost:
    
        r0 = android.graphics.Shader.TileMode.REPEAT;
     */
    /* JADX WARN: Code restructure failed: missing block: B:122:0x025c, code lost:
    
        r11 = new android.graphics.RadialGradient(r8, r9, r25, r20, r21, r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:124:0x0268, code lost:
    
        return new defpackage.C4782(r11, (android.content.res.ColorStateList) null, 0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:126:0x0270, code lost:
    
        throw new org.xmlpull.v1.XmlPullParserException("<gradient> tag requires 'gradientRadius' attribute with radial type");
     */
    /* JADX WARN: Code restructure failed: missing block: B:92:0x01da, code lost:
    
        if (r13.size() <= 0) goto L94;
     */
    /* JADX WARN: Code restructure failed: missing block: B:93:0x01dc, code lost:
    
        r0 = new ᵪᵨ(r13, r7);
     */
    /* JADX WARN: Code restructure failed: missing block: B:94:0x01e2, code lost:
    
        r0 = null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:95:0x01e3, code lost:
    
        if (r0 == null) goto L97;
     */
    /* JADX WARN: Code restructure failed: missing block: B:97:0x01e7, code lost:
    
        if (r20 == false) goto L99;
     */
    /* JADX WARN: Code restructure failed: missing block: B:98:0x01e9, code lost:
    
        r0 = new ᵪᵨ(r6, r5, r12);
     */
    /* JADX WARN: Code restructure failed: missing block: B:99:0x01ef, code lost:
    
        r0 = new ᵪᵨ(r6, r12);
     */
    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static defpackage.C4782 m10077(android.content.res.Resources r30, int r31, android.content.res.Resources.Theme r32) throws org.xmlpull.v1.XmlPullParserException, android.content.res.Resources.NotFoundException, java.io.IOException {
        /*
            Method dump skipped, instructions count: 665
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.C4782.m10077(android.content.res.Resources, int, android.content.res.Resources$Theme):ᵶʿᵛ");
    }

    public String toString() {
        switch (this.f17766) {
            case C1339.DOUBLE_FIELD_NUMBER /* 7 */:
                StringBuilder sb = new StringBuilder("JsonConfiguration(encodeDefaults=false, ignoreUnknownKeys=false, isLenient=false, allowStructuredMapKeys=false, prettyPrint=false, explicitNulls=true, prettyPrintIndent='");
                sb.append((String) this.f17768);
                sb.append("', coerceInputValues=false, useArrayPolymorphism=false, classDiscriminator='");
                sb.append((String) this.f17767);
                sb.append("', allowSpecialFloatingPointValues=false, useAlternativeNames=true, namingStrategy=null, decodeEnumsCaseInsensitive=false, allowTrailingComma=false, allowComments=false, classDiscriminatorMode=");
                int i = this.f17765;
                sb.append(i != 1 ? i != 2 ? i != 3 ? "null" : "POLYMORPHIC" : "ALL_JSON_OBJECTS" : "NONE");
                sb.append(')');
                return sb.toString();
            case C1339.BYTES_FIELD_NUMBER /* 8 */:
                return m10095();
            case 18:
                StringBuilder sb2 = new StringBuilder();
                if (((EnumC3518) this.f17768) == EnumC3518.f13215) {
                    sb2.append("HTTP/1.0");
                } else {
                    sb2.append("HTTP/1.1");
                }
                sb2.append(' ');
                sb2.append(this.f17765);
                sb2.append(' ');
                sb2.append((String) this.f17767);
                return sb2.toString();
            default:
                return super.toString();
        }
    }

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public int m10078(byte[] bArr, byte[] bArr2) throws IOException {
        C1352 c1352 = (C1352) this.f17767;
        C5103 c5103 = (C5103) c1352.m8436(new C5106(c1352.f14121, c1352.f14123, c1352.f5581.f16166.f10874, 1163287L, c1352.f5580, new C3274(bArr.length, bArr), c1352.f5578), C1352.f5577);
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(4096);
        try {
            byteArrayOutputStream.write(c5103.f19050);
            if (EnumC3754.m8380(((C0663) ((InterfaceC4029) ((ᵢˇᵭ) c5103).ᵧᵾˀˈ)).f3293).equals(EnumC3754.f14006)) {
                byteArrayOutputStream.write(c1352.m4191());
            }
            byte[] byteArray = byteArrayOutputStream.toByteArray();
            System.arraycopy(byteArray, 0, bArr2, 0, byteArray.length);
            return byteArray.length;
        } catch (IOException e) {
            throw new SMBRuntimeException(e);
        }
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public C2172 m10079(boolean z) {
        C3722 c3722;
        C3722 c37222;
        if (z && (c37222 = (C3722) this.f17767) != null) {
            throw c37222.m8353();
        }
        C2172 c2172M5808 = C2172.m5808(this.f17765, (Object[]) this.f17768, this);
        if (!z || (c3722 = (C3722) this.f17767) == null) {
            return c2172M5808;
        }
        throw c3722.m8353();
    }

    /* renamed from: ˌʾˀ, reason: contains not printable characters */
    public boolean m10080() {
        ColorStateList colorStateList;
        return ((Shader) this.f17768) == null && (colorStateList = (ColorStateList) this.f17767) != null && colorStateList.isStateful();
    }

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public Object m10081(int i) {
        SparseArray sparseArray = (SparseArray) this.f17768;
        if (this.f17765 == -1) {
            this.f17765 = 0;
        }
        while (true) {
            int i2 = this.f17765;
            if (i2 <= 0 || i >= sparseArray.keyAt(i2)) {
                break;
            }
            this.f17765--;
        }
        while (this.f17765 < sparseArray.size() - 1 && i >= sparseArray.keyAt(this.f17765 + 1)) {
            this.f17765++;
        }
        return sparseArray.valueAt(this.f17765);
    }

    @Override // defpackage.InterfaceC1612
    /* renamed from: ˏˋٴ */
    public /* synthetic */ void mo4627() {
    }

    @Override // defpackage.InterfaceC1612
    /* renamed from: ˏᵙ */
    public C5257 mo4628(InterfaceC1383 interfaceC1383, long j) {
        long position = interfaceC1383.getPosition();
        long jM10100 = m10100(interfaceC1383);
        long jMo4244 = interfaceC1383.mo4244();
        interfaceC1383.mo4250(Math.max(6, ((C4900) this.f17768).f18240));
        long jM101002 = m10100(interfaceC1383);
        return (jM10100 > j || jM101002 <= j) ? jM101002 <= j ? new C5257(jM101002, -2, interfaceC1383.mo4244()) : new C5257(jM10100, -1, position) : new C5257(-9223372036854775807L, 0, jMo4244);
    }

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public void m10082(long j, int i, long j2) {
        C3112 c3112 = new C3112(1, i, null, 3, null, AbstractC3558.m8161(j), AbstractC3558.m8161(j2));
        C2477 c2477 = (C2477) this.f17768;
        c2477.getClass();
        m10101(new C0817(this, c2477, c3112, 6));
    }

    /* renamed from: ˑᵱ, reason: contains not printable characters */
    public void m10083(C0417 c0417, int i, IOException iOException, boolean z) {
        m10093(c0417, i, -1, null, 0, null, -9223372036854775807L, -9223372036854775807L, iOException, z);
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public void m10084(int i) throws IllegalStateException {
        ByteArrayOutputStream byteArrayOutputStream = (ByteArrayOutputStream) this.f17767;
        byte[] byteArray = byteArrayOutputStream.toByteArray();
        int length = byteArray.length - i;
        int i2 = 0;
        while (i2 < length) {
            int i3 = i2 + 16;
            ((Mac) this.f17768).update(byteArray, i2, i3 <= length ? 16 : length - i2);
            i2 = i3;
        }
        byteArrayOutputStream.reset();
    }

    /* renamed from: ᵞʡ, reason: contains not printable characters */
    public void m10085(C0417 c0417, int i, int i2, C3446 c3446, int i3, Object obj, long j, long j2) {
        m10101(new C2406(this, c0417, new C3112(i, i2, c3446, i3, obj, AbstractC3558.m8161(j), AbstractC3558.m8161(j2)), 0));
    }

    /* renamed from: ᵡʠ, reason: contains not printable characters */
    public void m10086(C0417 c0417, int i, int i2, C3446 c3446, int i3, Object obj, long j, long j2) {
        m10101(new C2406(this, c0417, new C3112(i, i2, c3446, i3, obj, AbstractC3558.m8161(j), AbstractC3558.m8161(j2)), 1));
    }

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public void m10087(byte[] bArr, int i, int i2) {
        ByteArrayOutputStream byteArrayOutputStream = (ByteArrayOutputStream) this.f17767;
        try {
            if (byteArrayOutputStream.size() + i2 > 4096) {
                m10084(0);
            }
            byteArrayOutputStream.write(bArr, i, i2);
        } catch (IllegalStateException e) {
            C1260.m3814(e);
        }
    }

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public void m10088(C3014 c3014) {
        String strM1533 = c3014.f11599.m1533("CSeq");
        strM1533.getClass();
        int i = Integer.parseInt(strM1533);
        C2325 c2325 = (C2325) this.f17767;
        SparseArray sparseArray = c2325.f9117;
        ᵛᵾˏ.ᵿʗᵝʽ(sparseArray.get(i) == null);
        sparseArray.append(i, c3014);
        c2325.f9112.m7502(AbstractC0306.m1682(c3014));
        this.f17768 = c3014;
    }

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public void m10089(C0417 c0417, int i, int i2, C3446 c3446, int i3, Object obj, long j, long j2, int i4) {
        m10101(new C0884(this, c0417, new C3112(i, i2, c3446, i3, obj, AbstractC3558.m8161(j), AbstractC3558.m8161(j2)), i4));
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public void m10090() {
        ((C3014) this.f17768).getClass();
        C2106 c2106 = ((C3014) this.f17768).f11599.f1752;
        HashMap map = new HashMap();
        AbstractC5447 it = ((C4698) c2106.f8329.keySet()).iterator();
        while (true) {
            AbstractC4598 abstractC4598 = (AbstractC4598) it;
            if (!abstractC4598.hasNext()) {
                C3014 c3014 = (C3014) this.f17768;
                m10088(m10094(c3014.f11601, ((C2325) this.f17767).f9122, map, c3014.f11600));
                return;
            }
            String str = (String) abstractC4598.next();
            if (!str.equals("CSeq") && !str.equals("User-Agent") && !str.equals("Session") && !str.equals("Authorization")) {
                map.put(str, (String) ᵯˉˋ.ᵨᵳʝ(c2106.get(str)));
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m10091() {
        C1894 c1894;
        ImageView imageView = (ImageView) this.f17768;
        Drawable drawable = imageView.getDrawable();
        if (drawable != null) {
            AbstractC1991.m5513(drawable);
        }
        if (drawable == null || (c1894 = (C1894) this.f17767) == null) {
            return;
        }
        C3159.m7513(drawable, c1894, imageView.getDrawableState());
    }

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public void m10092(AttributeSet attributeSet, int i) {
        int resourceId;
        ImageView imageView = (ImageView) this.f17768;
        Context context = imageView.getContext();
        int[] iArr = AbstractC0542.f2807;
        C1570 c1570M4541 = C1570.m4541(context, attributeSet, iArr, i);
        TypedArray typedArray = (TypedArray) c1570M4541.f6230;
        AbstractC2873.m7025(imageView, imageView.getContext(), iArr, attributeSet, (TypedArray) c1570M4541.f6230, i);
        try {
            Drawable drawable = imageView.getDrawable();
            if (drawable == null && (resourceId = typedArray.getResourceId(1, -1)) != -1 && (drawable = ᵕˏᵛ.ˑᵥˁ(imageView.getContext(), resourceId)) != null) {
                imageView.setImageDrawable(drawable);
            }
            if (drawable != null) {
                AbstractC1991.m5513(drawable);
            }
            if (typedArray.hasValue(2)) {
                imageView.setImageTintList(c1570M4541.m4549(2));
            }
            if (typedArray.hasValue(3)) {
                imageView.setImageTintMode(AbstractC1991.m5512(typedArray.getInt(3, -1), null));
            }
            c1570M4541.m4542();
        } catch (Throwable th) {
            c1570M4541.m4542();
            throw th;
        }
    }

    /* renamed from: ᵨᵳʝ, reason: contains not printable characters */
    public void m10093(C0417 c0417, int i, int i2, C3446 c3446, int i3, Object obj, long j, long j2, IOException iOException, boolean z) {
        m10101(new C1459(this, c0417, new C3112(i, i2, c3446, i3, obj, AbstractC3558.m8161(j), AbstractC3558.m8161(j2)), iOException, z));
    }

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public C3014 m10094(int i, String str, Map map, Uri uri) {
        C2325 c2325 = (C2325) this.f17767;
        String str2 = c2325.f9126;
        int i2 = this.f17765;
        this.f17765 = i2 + 1;
        ˊʘ r0 = new ˊʘ(i2, str2, str);
        if (c2325.f9113 != null) {
            c2325.f9111.getClass();
            try {
                r0.ˑᵱ("Authorization", c2325.f9113.ᵥᵯˎ(c2325.f9111, uri, i));
            } catch (ParserException e) {
                C2325.m6044(c2325, new RtspMediaSource$RtspPlaybackException(e));
            }
        }
        for (Map.Entry entry : map.entrySet()) {
            r0.ˑᵱ((String) entry.getKey(), (String) entry.getValue());
        }
        return new C3014(uri, i, new C0227(r0), "");
    }

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public String m10095() {
        StringBuilder sb = new StringBuilder("$");
        int i = this.f17765 + 1;
        for (int i2 = 0; i2 < i; i2++) {
            Object obj = ((Object[]) this.f17768)[i2];
            if (obj instanceof InterfaceC3119) {
                InterfaceC3119 interfaceC3119 = (InterfaceC3119) obj;
                boolean z = ᵲᵝᵪ.ᵹᵝᵶ(interfaceC3119.mo6381(), C2195.f8621);
                int[] iArr = (int[]) this.f17767;
                if (!z) {
                    int i3 = iArr[i2];
                    if (i3 >= 0) {
                        sb.append(".");
                        sb.append(interfaceC3119.mo6382(i3));
                    }
                } else if (iArr[i2] != -1) {
                    sb.append("[");
                    sb.append(((int[]) this.f17767)[i2]);
                    sb.append("]");
                }
            } else if (obj != ˊᵻ.ᵡⁱᵥ) {
                sb.append("['");
                sb.append(obj);
                sb.append("']");
            }
        }
        return sb.toString();
    }

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public void m10096(byte[] bArr) throws InvalidKeyException {
        try {
            ((Mac) this.f17768).init(new SecretKeySpec(bArr, "HmacSHA1"));
        } catch (InvalidKeyException e) {
            C1260.m3814(e);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public C5217 m10097() {
        int i = this.f17765;
        if (i == 0 && ((KeyGenParameterSpec) this.f17767) == null) {
            ᵹˉᵞ.ˌᵜᵹᵩ("build() called before setKeyGenParameterSpec or setKeyScheme.");
            return null;
        }
        if (i == 1) {
            this.f17767 = new KeyGenParameterSpec.Builder((String) this.f17768, 3).setBlockModes("GCM").setEncryptionPaddings("NoPadding").setKeySize(256).build();
        }
        KeyGenParameterSpec keyGenParameterSpec = (KeyGenParameterSpec) this.f17767;
        if (keyGenParameterSpec == null) {
            C1260.m3813("KeyGenParameterSpec was null after build() check");
            return null;
        }
        Object obj = AbstractC2897.f11255;
        if (keyGenParameterSpec.getKeySize() != 256) {
            ᵹˉᵞ.ᵯٴᵦ("invalid key size, want 256 bits got ", keyGenParameterSpec.getKeySize(), " bits");
            return null;
        }
        if (!Arrays.equals(keyGenParameterSpec.getBlockModes(), new String[]{"GCM"})) {
            C5562.m11196(Arrays.toString(keyGenParameterSpec.getBlockModes()), "invalid block mode, want GCM got ");
            return null;
        }
        if (keyGenParameterSpec.getPurposes() != 3) {
            C0910.m3053(keyGenParameterSpec.getPurposes(), "invalid purposes mode, want PURPOSE_ENCRYPT | PURPOSE_DECRYPT got ");
            return null;
        }
        if (!Arrays.equals(keyGenParameterSpec.getEncryptionPaddings(), new String[]{"NoPadding"})) {
            C5562.m11196(Arrays.toString(keyGenParameterSpec.getEncryptionPaddings()), "invalid padding mode, want NoPadding got ");
            return null;
        }
        if (keyGenParameterSpec.isUserAuthenticationRequired() && keyGenParameterSpec.getUserAuthenticationValidityDurationSeconds() < 1) {
            ᵹˉᵞ.ˌᵜᵹᵩ("per-operation authentication is not supported (UserAuthenticationValidityDurationSeconds must be >0)");
            return null;
        }
        synchronized (AbstractC2897.f11255) {
            String keystoreAlias = keyGenParameterSpec.getKeystoreAlias();
            KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
            keyStore.load(null);
            if (!keyStore.containsAlias(keystoreAlias)) {
                try {
                    KeyGenerator keyGenerator = KeyGenerator.getInstance("AES", "AndroidKeyStore");
                    keyGenerator.init(keyGenParameterSpec);
                    keyGenerator.generateKey();
                } catch (ProviderException e) {
                    throw new GeneralSecurityException(e.getMessage(), e);
                }
            }
        }
        return new C5217((KeyGenParameterSpec) this.f17767, keyGenParameterSpec.getKeystoreAlias());
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public void m10098(int i, C3446 c3446, int i2, Object obj, long j) {
        m10101(new C3376(this, 11, new C3112(1, i, c3446, i2, obj, AbstractC3558.m8161(j), -9223372036854775807L)));
    }

    /* renamed from: ᵸʓᵠ, reason: contains not printable characters */
    public void m10099(C0417 c0417, int i) {
        m10085(c0417, i, -1, null, 0, null, -9223372036854775807L, -9223372036854775807L);
    }

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public long m10100(InterfaceC1383 interfaceC1383) {
        int iMo4247;
        C4184 c4184 = (C4184) this.f17767;
        C4900 c4900 = (C4900) this.f17768;
        while (interfaceC1383.mo4244() < interfaceC1383.getLength() - 6) {
            int i = this.f17765;
            long jMo4244 = interfaceC1383.mo4244();
            C3493 c3493 = new C3493(17);
            int i2 = 0;
            boolean z = false;
            interfaceC1383.mo4249(c3493.f13082, 0, 2);
            if (c3493.m7942(0, ByteOrder.BIG_ENDIAN) != i) {
                interfaceC1383.mo4245();
                interfaceC1383.mo4250((int) (jMo4244 - interfaceC1383.getPosition()));
            } else {
                byte[] bArr = c3493.f13082;
                while (i2 < 15 && (iMo4247 = interfaceC1383.mo4247(bArr, 2 + i2, 15 - i2)) != -1) {
                    i2 += iMo4247;
                }
                c3493.m7950(i2 + 2);
                interfaceC1383.mo4245();
                interfaceC1383.mo4250((int) (jMo4244 - interfaceC1383.getPosition()));
                z = ˋˌ.ˏˋٴ(c3493, c4900, i, c4184);
            }
            if (z) {
                break;
            }
            interfaceC1383.mo4250(1);
        }
        if (interfaceC1383.mo4244() < interfaceC1383.getLength() - 6) {
            return c4184.f15658;
        }
        interfaceC1383.mo4250((int) (interfaceC1383.getLength() - interfaceC1383.mo4244()));
        return c4900.f18244;
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public void m10101(InterfaceC4038 interfaceC4038) {
        Iterator it = ((CopyOnWriteArrayList) this.f17767).iterator();
        while (it.hasNext()) {
            C3459 c3459 = (C3459) it.next();
            AbstractC3558.m8158(c3459.f12984, new RunnableC5417(interfaceC4038, 5, c3459.f12985));
        }
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public C4948 m10102() {
        if ("".isEmpty()) {
            return new C4948(((Long) this.f17767).longValue(), this.f17765, (String) this.f17768);
        }
        ᵹˉᵞ.ᵳٴᵶ("Missing required properties:".concat(""));
        return null;
    }

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public void m10103(Set set) {
        if (AbstractC3915.m8586(set)) {
            int size = (set.size() + this.f17765) * 2;
            Object[] objArr = (Object[]) this.f17768;
            if (size > objArr.length) {
                this.f17768 = Arrays.copyOf(objArr, AbstractC3435.m7813(objArr.length, size));
            }
        }
        Iterator it = set.iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            m10104(entry.getKey(), entry.getValue());
        }
    }

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public void m10104(Object obj, Object obj2) {
        int i = (this.f17765 + 1) * 2;
        Object[] objArr = (Object[]) this.f17768;
        if (i > objArr.length) {
            this.f17768 = Arrays.copyOf(objArr, AbstractC3435.m7813(objArr.length, i));
        }
        ˏᵭᵔᵬ.ˏᵙ(obj, obj2);
        Object[] objArr2 = (Object[]) this.f17768;
        int i2 = this.f17765;
        int i3 = i2 * 2;
        objArr2[i3] = obj;
        objArr2[i3 + 1] = obj2;
        this.f17765 = i2 + 1;
    }
}
