package defpackage;

import j$.util.DesugarCollections;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.OutputLengthException;

/* renamed from: ᵘᵧˏ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2533 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public Object f9883;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public boolean f9884;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f9885;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public Object f9886;

    public C2533(InterfaceC3899 interfaceC3899) {
        this(interfaceC3899, false, C0097.f1357, Integer.MAX_VALUE);
    }

    public C2533(InterfaceC3899 interfaceC3899, boolean z, AbstractC0582 abstractC0582, int i) {
        this.f9886 = interfaceC3899;
        this.f9884 = z;
        this.f9883 = abstractC0582;
        this.f9885 = i;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static C2533 m6376(String str) {
        ᵛᵾˏ.ˌᵜᵹᵩ("The separator may not be the empty string.", str.length() != 0);
        return str.length() == 1 ? m6377(str.charAt(0)) : new C2533(new C0434(8, str));
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static C2533 m6377(char c) {
        return new C2533(new ᵿʤˑᵦ(26, new C2227(c, 0)));
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public List m6378(CharSequence charSequence) {
        charSequence.getClass();
        Iterator itMo2038 = ((InterfaceC3899) this.f9886).mo2038(this, charSequence);
        ArrayList arrayList = new ArrayList();
        while (true) {
            C0804 c0804 = (C0804) itMo2038;
            if (!c0804.hasNext()) {
                return DesugarCollections.unmodifiableList(arrayList);
            }
            arrayList.add((String) c0804.next());
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public int m6379(int i, byte[] bArr) {
        byte[] bArr2 = (byte[]) this.f9883;
        try {
            int i2 = this.f9885;
            if (i + i2 > bArr.length) {
                throw new OutputLengthException("output buffer too short for doFinal()");
            }
            int i3 = 0;
            if (i2 != 0) {
                if (!this.f9884) {
                    throw new DataLengthException("data not block size aligned");
                }
                ((ˊᵘʛ) this.f9886).ˀᵗᵩ(0, 0, bArr2, bArr2);
                int i4 = this.f9885;
                this.f9885 = 0;
                System.arraycopy(bArr2, 0, bArr, i, i4);
                i3 = i4;
            }
            m6380();
            return i3;
        } catch (Throwable th) {
            m6380();
            throw th;
        }
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public void m6380() {
        int i = 0;
        while (true) {
            byte[] bArr = (byte[]) this.f9883;
            if (i >= bArr.length) {
                this.f9885 = 0;
                return;
            } else {
                bArr[i] = 0;
                i++;
            }
        }
    }
}
