package p463.p473.p474;

import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.OutputLengthException;
import p463.p473.p474.p476.C7153;
import p463.p473.p474.p476.C7154;

/* JADX INFO: renamed from: ޒ.ؠ.֏.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C7144 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public byte[] f20695;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public int f20696;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public boolean f20697;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public InterfaceC7143 f20698;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public boolean f20699;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public boolean f20700;

    public C7144(InterfaceC7143 interfaceC7143) {
        this.f20698 = interfaceC7143;
        if (((C7153) interfaceC7143) == null) {
            throw null;
        }
        this.f20695 = new byte[8];
        this.f20696 = 0;
        this.f20700 = false;
        if (0 != 0 || (interfaceC7143 instanceof C7154)) {
            this.f20699 = true;
        } else {
            this.f20699 = false;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public int m10494(byte[] bArr, int i) {
        try {
            if (this.f20696 + i > bArr.length) {
                throw new OutputLengthException("output buffer too short for doFinal()");
            }
            int i2 = 0;
            if (this.f20696 != 0) {
                if (!this.f20699) {
                    throw new DataLengthException("data not block size aligned");
                }
                ((C7153) this.f20698).m10531(this.f20695, 0, this.f20695, 0);
                int i3 = this.f20696;
                this.f20696 = 0;
                System.arraycopy(this.f20695, 0, bArr, i, i3);
                i2 = i3;
            }
            return i2;
        } finally {
            m10495();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m10495() {
        int i = 0;
        while (true) {
            byte[] bArr = this.f20695;
            if (i >= bArr.length) {
                break;
            }
            bArr[i] = 0;
            i++;
        }
        this.f20696 = 0;
        if (((C7153) this.f20698) == null) {
            throw null;
        }
    }
}
