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

import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;

/* JADX INFO: loaded from: classes2.dex */
public final class vx1 extends jw1 {

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final Integer f17796d;

    public vx1(xx1 xx1Var, i92 i92Var, Integer num) {
        this.f17794b = xx1Var;
        this.f17795c = i92Var;
        this.f17796d = num;
    }

    public static vx1 A(xx1 xx1Var, Integer num) throws GeneralSecurityException {
        i92 i92VarA;
        wx1 wx1Var = xx1Var.f18612b;
        if (wx1Var == wx1.f18249b) {
            if (num == null) {
                throw new GeneralSecurityException("For given Variant TINK the value of idRequirement must be non-null");
            }
            i92VarA = i92.a(ByteBuffer.allocate(5).put((byte) 1).putInt(num.intValue()).array());
        } else {
            if (wx1Var != wx1.f18250c) {
                throw new GeneralSecurityException("Unknown Variant: ".concat(xx1Var.f18612b.f18251a));
            }
            if (num != null) {
                throw new GeneralSecurityException("For given Variant NO_PREFIX the value of idRequirement must be null");
            }
            i92VarA = i92.a(new byte[0]);
        }
        return new vx1(xx1Var, i92VarA, num);
    }

    @Override // com.google.android.gms.internal.ads.rb
    public final /* synthetic */ dw1 i() {
        return this.f17794b;
    }

    @Override // com.google.android.gms.internal.ads.rb
    public final Integer r() {
        return this.f17796d;
    }

    @Override // com.google.android.gms.internal.ads.jw1
    public final i92 z() {
        return this.f17795c;
    }
}
