package com.google.android.gms.internal.pal;

import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;

/* JADX INFO: loaded from: classes2.dex */
public final class vd implements ge {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final com.google.android.gms.common.api.internal.x0 f21291d = new com.google.android.gms.common.api.internal.x0(12);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final SecretKeySpec f21292a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f21293b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f21294c;

    public vd(byte[] bArr, int i10) throws GeneralSecurityException {
        if (!q9.y(2)) {
            throw new GeneralSecurityException("Can not use AES-CTR in FIPS-mode, as BoringCrypto module is not available.");
        }
        je.a(bArr.length);
        this.f21292a = new SecretKeySpec(bArr, "AES");
        int blockSize = ((Cipher) f21291d.get()).getBlockSize();
        this.f21294c = blockSize;
        if (i10 < 12 || i10 > blockSize) {
            throw new GeneralSecurityException("invalid IV size");
        }
        this.f21293b = i10;
    }
}
