package defpackage;

import java.security.InvalidAlgorithmParameterException;
import java.util.Arrays;
import javax.crypto.spec.SecretKeySpec;

/* renamed from: ـﹳ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2150 implements InterfaceC0995 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public static final byte[] f8479 = {0};

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final byte[] f8480;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final InterfaceC5287 f8481;

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

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final byte[] f8483;

    public C2150(int i, ʽʽﹶ r4) throws InvalidAlgorithmParameterException {
        this.f8481 = r4;
        this.f8482 = i;
        this.f8480 = new byte[0];
        this.f8483 = new byte[0];
        if (i < 10) {
            throw new InvalidAlgorithmParameterException("tag size too small, need at least 10 bytes");
        }
        r4.ˇʼʤˎ(i, new byte[0]);
    }

    public C2150(C1596 c1596) {
        this.f8481 = ᵱᵞᵪ.ᵹᵝᵶ(C0770.m2857(C5169.m10668(c1596.f6333.f11069), c1596.f6334));
        C2856 c2856 = c1596.f6333;
        this.f8482 = c2856.f11070;
        this.f8480 = c1596.f6331.m9655();
        if (c2856.f11068.equals(C0204.f1683)) {
            this.f8483 = Arrays.copyOf(f8479, 1);
        } else {
            this.f8483 = new byte[0];
        }
    }

    public C2150(C2204 c2204) {
        this.f8481 = new ʽʽﹶ("HMAC" + c2204.f8649.f7956, new SecretKeySpec(((C4542) c2204.f8650.ᵢˇᵭ).m9655(), "HMAC"));
        C1978 c1978 = c2204.f8649;
        this.f8482 = c1978.f7955;
        this.f8480 = c2204.f8647.m9655();
        if (c1978.f7953.equals(C2389.f9331)) {
            this.f8483 = Arrays.copyOf(f8479, 1);
        } else {
            this.f8483 = new byte[0];
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final byte[] m5773(byte[] bArr) {
        byte[] bArr2 = this.f8483;
        int length = bArr2.length;
        int i = this.f8482;
        InterfaceC5287 interfaceC5287 = this.f8481;
        byte[] bArr3 = this.f8480;
        return length > 0 ? ˉᵜˆ.ᵻᵢﹳᵰ(new byte[][]{bArr3, interfaceC5287.mo5875(i, ˉᵜˆ.ᵻᵢﹳᵰ(new byte[][]{bArr, bArr2}))}) : ˉᵜˆ.ᵻᵢﹳᵰ(new byte[][]{bArr3, interfaceC5287.mo5875(i, bArr)});
    }
}
