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

import java.security.GeneralSecurityException;

/* JADX INFO: loaded from: classes2.dex */
public final class v9 extends q9 {

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final y9 f21290j;

    public v9(y9 y9Var) {
        this.f21290j = y9Var;
    }

    public static v9 I0(y9 y9Var, o3 o3Var, Integer num) throws GeneralSecurityException {
        if (o3Var.d() != 32) {
            throw new GeneralSecurityException("Invalid key size");
        }
        x9 x9Var = x9.f21340e;
        x9 x9Var2 = y9Var.f21383k;
        if (x9Var2 != x9Var && num == null) {
            throw new GeneralSecurityException("Cannot create key without ID requirement with format with ID requirement");
        }
        if (x9Var2 == x9Var && num != null) {
            throw new GeneralSecurityException("Cannot create key with ID requirement with format without ID requirement");
        }
        return new v9(y9Var);
    }

    @Override // com.google.android.gms.internal.pal.q9
    public final /* synthetic */ q9 i() {
        return this.f21290j;
    }
}
