package p138.p176.p278.p279.p290;

import java.security.InvalidAlgorithmParameterException;
import java.util.Arrays;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: ދ.ހ.ހ.֏.ޞ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C5500 extends AbstractC5547 {
    public C5500(byte[] bArr, String str, int i, String str2, int i2, int i3, int i4) throws InvalidAlgorithmParameterException {
        int length = bArr.length;
        if (length < 16 || length < i) {
            StringBuilder sbM4889 = C2803.m4889("ikm too short, must be >= ");
            sbM4889.append(Math.max(16, i));
            throw new InvalidAlgorithmParameterException(sbM4889.toString());
        }
        C5554.m8920(i);
        if (i2 < 10) {
            throw new InvalidAlgorithmParameterException(C2803.m4871("tag size too small ", i2));
        }
        if ((str2.equals("HmacSha1") && i2 > 20) || ((str2.equals("HmacSha256") && i2 > 32) || (str2.equals("HmacSha512") && i2 > 64))) {
            throw new InvalidAlgorithmParameterException("tag size too big");
        }
        if (((((i3 - i4) - i2) - i) - 7) - 1 <= 0) {
            throw new InvalidAlgorithmParameterException("ciphertextSegmentSize too small");
        }
        Arrays.copyOf(bArr, bArr.length);
    }
}
