48 lines
1.5 KiB
Java
48 lines
1.5 KiB
Java
package com.google.android.gms.internal.p002firebaseauthapi;
|
|
|
|
import java.security.GeneralSecurityException;
|
|
|
|
/* loaded from: classes2.dex */
|
|
final class zzfg implements zzex {
|
|
private final zzes zza;
|
|
private final int zzb;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static zzfg zzc(int i) throws GeneralSecurityException {
|
|
int i2 = i - 1;
|
|
if (i2 == 0) {
|
|
return new zzfg(new zzes("HmacSha256"), 1);
|
|
}
|
|
if (i2 != 1) {
|
|
return new zzfg(new zzes("HmacSha512"), 3);
|
|
}
|
|
return new zzfg(new zzes("HmacSha384"), 2);
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzex
|
|
public final byte[] zza(byte[] bArr, zzey zzeyVar) throws GeneralSecurityException {
|
|
byte[] zzh = zzpx.zzh(zzpx.zzi(this.zzb, zzeyVar.zza().zzc()), zzpx.zzk(zzpx.zzl(this.zzb), 1, bArr));
|
|
byte[] zzc = zzpp.zzc(bArr, zzeyVar.zzb().zzc());
|
|
byte[] zzd = zzff.zzd(zzb());
|
|
zzes zzesVar = this.zza;
|
|
return zzesVar.zzb(null, zzh, "eae_prk", zzc, "shared_secret", zzd, zzesVar.zza());
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzex
|
|
public final byte[] zzb() throws GeneralSecurityException {
|
|
int i = this.zzb - 1;
|
|
if (i == 0) {
|
|
return zzff.zzc;
|
|
}
|
|
if (i != 1) {
|
|
return zzff.zze;
|
|
}
|
|
return zzff.zzd;
|
|
}
|
|
|
|
private zzfg(zzes zzesVar, int i) {
|
|
this.zza = zzesVar;
|
|
this.zzb = i;
|
|
}
|
|
}
|