Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,191 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "ChannelIdValueCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class ChannelIdValue extends AbstractSafeParcelable {
@SafeParcelable.Field(getter = "getTypeAsInt", id = 2, type = "int")
private final ChannelIdValueType zza;
@SafeParcelable.Field(getter = "getStringValue", id = 3)
private final String zzb;
@SafeParcelable.Field(getter = "getObjectValueAsString", id = 4)
private final String zzc;
@NonNull
public static final Parcelable.Creator<ChannelIdValue> CREATOR = new zzb();
@NonNull
public static final ChannelIdValue ABSENT = new ChannelIdValue();
@NonNull
public static final ChannelIdValue UNAVAILABLE = new ChannelIdValue("unavailable");
@NonNull
public static final ChannelIdValue UNUSED = new ChannelIdValue("unused");
public enum ChannelIdValueType implements Parcelable {
ABSENT(0),
STRING(1),
OBJECT(2);
@NonNull
public static final Parcelable.Creator<ChannelIdValueType> CREATOR = new zza();
private final int zzb;
ChannelIdValueType(int i) {
this.zzb = i;
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
parcel.writeInt(this.zzb);
}
}
public static class UnsupportedChannelIdValueTypeException extends Exception {
public UnsupportedChannelIdValueTypeException(int i) {
super(String.format("ChannelIdValueType %s not supported", Integer.valueOf(i)));
}
}
private ChannelIdValue() {
this.zza = ChannelIdValueType.ABSENT;
this.zzc = null;
this.zzb = null;
}
@NonNull
public static ChannelIdValueType toChannelIdValueType(int i) throws UnsupportedChannelIdValueTypeException {
for (ChannelIdValueType channelIdValueType : ChannelIdValueType.values()) {
if (i == channelIdValueType.zzb) {
return channelIdValueType;
}
}
throw new UnsupportedChannelIdValueTypeException(i);
}
public boolean equals(@NonNull Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ChannelIdValue)) {
return false;
}
ChannelIdValue channelIdValue = (ChannelIdValue) obj;
if (!this.zza.equals(channelIdValue.zza)) {
return false;
}
int ordinal = this.zza.ordinal();
if (ordinal == 0) {
return true;
}
if (ordinal == 1) {
return this.zzb.equals(channelIdValue.zzb);
}
if (ordinal != 2) {
return false;
}
return this.zzc.equals(channelIdValue.zzc);
}
@NonNull
public JSONObject getObjectValue() {
if (this.zzc == null) {
return null;
}
try {
return new JSONObject(this.zzc);
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String getObjectValueAsString() {
return this.zzc;
}
@NonNull
public String getStringValue() {
return this.zzb;
}
@NonNull
public ChannelIdValueType getType() {
return this.zza;
}
public int getTypeAsInt() {
return this.zza.zzb;
}
public int hashCode() {
int i;
int hashCode;
int hashCode2 = this.zza.hashCode() + 31;
int ordinal = this.zza.ordinal();
if (ordinal == 1) {
i = hashCode2 * 31;
hashCode = this.zzb.hashCode();
} else {
if (ordinal != 2) {
return hashCode2;
}
i = hashCode2 * 31;
hashCode = this.zzc.hashCode();
}
return i + hashCode;
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 2, getTypeAsInt());
SafeParcelWriter.writeString(parcel, 3, getStringValue(), false);
SafeParcelWriter.writeString(parcel, 4, getObjectValueAsString(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
@SafeParcelable.Constructor
public ChannelIdValue(@SafeParcelable.Param(id = 2) int i, @SafeParcelable.Param(id = 3) String str, @SafeParcelable.Param(id = 4) String str2) {
try {
this.zza = toChannelIdValueType(i);
this.zzb = str;
this.zzc = str2;
} catch (UnsupportedChannelIdValueTypeException e) {
throw new IllegalArgumentException(e);
}
}
private ChannelIdValue(String str) {
this.zzb = (String) Preconditions.checkNotNull(str);
this.zza = ChannelIdValueType.STRING;
this.zzc = null;
}
public ChannelIdValue(@NonNull JSONObject jSONObject) {
this.zzc = (String) Preconditions.checkNotNull(jSONObject.toString());
this.zza = ChannelIdValueType.OBJECT;
this.zzb = null;
}
}

View File

@@ -0,0 +1,134 @@
package com.google.android.gms.fido.u2f.api.common;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.fido.u2f.api.common.ChannelIdValue;
import org.json.JSONException;
import org.json.JSONObject;
@Deprecated
/* loaded from: classes2.dex */
public class ClientData {
@NonNull
public static final String KEY_CHALLENGE = "challenge";
@NonNull
public static final String KEY_CID_PUBKEY = "cid_pubkey";
@NonNull
public static final String KEY_ORIGIN = "origin";
@NonNull
public static final String KEY_TYPE = "typ";
@NonNull
public static final String TYPE_FINISH_ENROLLMENT = "navigator.id.finishEnrollment";
@NonNull
public static final String TYPE_GET_ASSERTION = "navigator.id.getAssertion";
private final String zza;
private final String zzb;
private final String zzc;
private final ChannelIdValue zzd;
public static class Builder implements Cloneable {
private String zza;
private String zzb;
private String zzc;
private ChannelIdValue zzd;
public Builder() {
this.zzd = ChannelIdValue.ABSENT;
}
public Builder(String str, String str2, String str3, ChannelIdValue channelIdValue) {
this.zza = str;
this.zzb = str2;
this.zzc = str3;
this.zzd = channelIdValue;
}
@NonNull
public static Builder newInstance() {
return new Builder();
}
@NonNull
public ClientData build() {
return new ClientData(this.zza, this.zzb, this.zzc, this.zzd);
}
@NonNull
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public Builder m769clone() {
return new Builder(this.zza, this.zzb, this.zzc, this.zzd);
}
@NonNull
public Builder setChallenge(@NonNull String str) {
this.zzb = str;
return this;
}
@NonNull
public Builder setChannelId(@NonNull ChannelIdValue channelIdValue) {
this.zzd = channelIdValue;
return this;
}
@NonNull
public Builder setOrigin(@NonNull String str) {
this.zzc = str;
return this;
}
@NonNull
public Builder setType(@NonNull String str) {
this.zza = str;
return this;
}
}
public ClientData(String str, String str2, String str3, ChannelIdValue channelIdValue) {
this.zza = (String) Preconditions.checkNotNull(str);
this.zzb = (String) Preconditions.checkNotNull(str2);
this.zzc = (String) Preconditions.checkNotNull(str3);
this.zzd = (ChannelIdValue) Preconditions.checkNotNull(channelIdValue);
}
public boolean equals(@NonNull Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ClientData)) {
return false;
}
ClientData clientData = (ClientData) obj;
return this.zza.equals(clientData.zza) && this.zzb.equals(clientData.zzb) && this.zzc.equals(clientData.zzc) && this.zzd.equals(clientData.zzd);
}
public int hashCode() {
return ((((((this.zza.hashCode() + 31) * 31) + this.zzb.hashCode()) * 31) + this.zzc.hashCode()) * 31) + this.zzd.hashCode();
}
@NonNull
public String toJsonString() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(KEY_TYPE, this.zza);
jSONObject.put(KEY_CHALLENGE, this.zzb);
jSONObject.put("origin", this.zzc);
ChannelIdValue.ChannelIdValueType channelIdValueType = ChannelIdValue.ChannelIdValueType.ABSENT;
int ordinal = this.zzd.getType().ordinal();
if (ordinal == 1) {
jSONObject.put(KEY_CID_PUBKEY, this.zzd.getStringValue());
} else if (ordinal == 2) {
jSONObject.put(KEY_CID_PUBKEY, this.zzd.getObjectValue());
}
return jSONObject.toString();
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -0,0 +1,65 @@
package com.google.android.gms.fido.u2f.api.common;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
@Deprecated
/* loaded from: classes2.dex */
public class Error {
@NonNull
@VisibleForTesting
public static final String JSON_ERROR_CODE = "errorCode";
@NonNull
@VisibleForTesting
public static final String JSON_ERROR_MESSAGE = "errorMessage";
private final ErrorCode zza;
private final String zzb;
public Error(@NonNull ErrorCode errorCode) {
this.zza = errorCode;
this.zzb = null;
}
public Error(@NonNull ErrorCode errorCode, @NonNull String str) {
this.zza = errorCode;
this.zzb = str;
}
@NonNull
public ErrorCode getErrorCode() {
return this.zza;
}
@NonNull
public String getErrorMessage() {
return this.zzb;
}
@NonNull
public JSONObject toJsonObject() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("errorCode", this.zza.getCode());
String str = this.zzb;
if (str != null) {
jSONObject.put("errorMessage", str);
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String toString() {
if (this.zzb == null) {
return String.format(Locale.ENGLISH, "{errorCode: %d}", Integer.valueOf(this.zza.getCode()));
}
return String.format(Locale.ENGLISH, "{errorCode: %d, errorMessage: %s}", Integer.valueOf(this.zza.getCode()), this.zzb);
}
}

View File

@@ -0,0 +1,60 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
@Deprecated
/* loaded from: classes2.dex */
public enum ErrorCode implements Parcelable {
OK(0),
OTHER_ERROR(1),
BAD_REQUEST(2),
CONFIGURATION_UNSUPPORTED(3),
DEVICE_INELIGIBLE(4),
TIMEOUT(5);
private final int zzc;
private static final String zza = ErrorCode.class.getSimpleName();
@NonNull
public static final Parcelable.Creator<ErrorCode> CREATOR = new Parcelable.Creator() { // from class: com.google.android.gms.fido.u2f.api.common.zzc
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
return ErrorCode.toErrorCode(parcel.readInt());
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new ErrorCode[i];
}
};
ErrorCode(int i) {
this.zzc = i;
}
@NonNull
public static ErrorCode toErrorCode(int i) {
for (ErrorCode errorCode : values()) {
if (i == errorCode.zzc) {
return errorCode;
}
}
return OTHER_ERROR;
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public int getCode() {
return this.zzc;
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
parcel.writeInt(this.zzc);
}
}

View File

@@ -0,0 +1,116 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.internal.fido.zzbi;
import com.google.android.gms.internal.fido.zzbj;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "ErrorResponseDataCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class ErrorResponseData extends ResponseData {
@NonNull
public static final Parcelable.Creator<ErrorResponseData> CREATOR = new zzd();
@NonNull
@VisibleForTesting
public static final String JSON_ERROR_CODE = "errorCode";
@NonNull
@VisibleForTesting
public static final String JSON_ERROR_MESSAGE = "errorMessage";
@SafeParcelable.Field(getter = "getErrorCodeAsInt", id = 2, type = "int")
private final ErrorCode zza;
@SafeParcelable.Field(getter = "getErrorMessage", id = 3)
private final String zzb;
@SafeParcelable.Constructor
public ErrorResponseData(@SafeParcelable.Param(id = 2) int i, @SafeParcelable.Param(id = 3) String str) {
this.zza = ErrorCode.toErrorCode(i);
this.zzb = str;
}
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof ErrorResponseData)) {
return false;
}
ErrorResponseData errorResponseData = (ErrorResponseData) obj;
return Objects.equal(this.zza, errorResponseData.zza) && Objects.equal(this.zzb, errorResponseData.zzb);
}
@NonNull
public ErrorCode getErrorCode() {
return this.zza;
}
public int getErrorCodeAsInt() {
return this.zza.getCode();
}
@NonNull
public String getErrorMessage() {
return this.zzb;
}
public int hashCode() {
return Objects.hashCode(this.zza, this.zzb);
}
@Override // com.google.android.gms.fido.u2f.api.common.ResponseData
@NonNull
public final JSONObject toJsonObject() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("errorCode", this.zza.getCode());
String str = this.zzb;
if (str != null) {
jSONObject.put("errorMessage", str);
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String toString() {
zzbi zza = zzbj.zza(this);
zza.zza("errorCode", this.zza.getCode());
String str = this.zzb;
if (str != null) {
zza.zzb("errorMessage", str);
}
return zza.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 2, getErrorCodeAsInt());
SafeParcelWriter.writeString(parcel, 3, getErrorMessage(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public ErrorResponseData(@NonNull ErrorCode errorCode) {
this.zza = (ErrorCode) Preconditions.checkNotNull(errorCode);
this.zzb = null;
}
public ErrorResponseData(@NonNull ErrorCode errorCode, @NonNull String str) {
this.zza = (ErrorCode) Preconditions.checkNotNull(errorCode);
this.zzb = str;
}
}

View File

@@ -0,0 +1,163 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.common.util.Base64Utils;
import com.google.android.gms.fido.common.Transport;
import com.google.android.gms.fido.u2f.api.common.ProtocolVersion;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "KeyHandleCreator")
@Deprecated
/* loaded from: classes2.dex */
public class KeyHandle extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<KeyHandle> CREATOR = new zze();
@SafeParcelable.VersionField(getter = "getVersionCode", id = 1)
private final int zza;
@SafeParcelable.Field(getter = "getBytes", id = 2)
private final byte[] zzb;
@SafeParcelable.Field(getter = "getProtocolVersionAsString", id = 3, type = "java.lang.String")
private final ProtocolVersion zzc;
@Nullable
@SafeParcelable.Field(getter = "getTransports", id = 4)
private final List zzd;
@SafeParcelable.Constructor
public KeyHandle(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) byte[] bArr, @SafeParcelable.Param(id = 3) String str, @Nullable @SafeParcelable.Param(id = 4) List list) {
this.zza = i;
this.zzb = bArr;
try {
this.zzc = ProtocolVersion.fromString(str);
this.zzd = list;
} catch (ProtocolVersion.UnsupportedProtocolException e) {
throw new IllegalArgumentException(e);
}
}
@NonNull
public static KeyHandle parseFromJson(@NonNull JSONObject jSONObject) throws JSONException {
try {
try {
return new KeyHandle(Base64.decode(jSONObject.getString(SignResponseData.JSON_RESPONSE_DATA_KEY_HANDLE), 8), ProtocolVersion.fromString(jSONObject.has("version") ? jSONObject.getString("version") : null), jSONObject.has("transports") ? Transport.parseTransports(jSONObject.getJSONArray("transports")) : null);
} catch (IllegalArgumentException e) {
throw new JSONException(e.toString());
}
} catch (ProtocolVersion.UnsupportedProtocolException e2) {
throw new JSONException(e2.toString());
}
}
public boolean equals(@NonNull Object obj) {
List list;
if (this == obj) {
return true;
}
if (!(obj instanceof KeyHandle)) {
return false;
}
KeyHandle keyHandle = (KeyHandle) obj;
if (!Arrays.equals(this.zzb, keyHandle.zzb) || !this.zzc.equals(keyHandle.zzc)) {
return false;
}
List list2 = this.zzd;
if (list2 == null && keyHandle.zzd == null) {
return true;
}
return list2 != null && (list = keyHandle.zzd) != null && list2.containsAll(list) && keyHandle.zzd.containsAll(this.zzd);
}
@NonNull
public byte[] getBytes() {
return this.zzb;
}
@NonNull
public ProtocolVersion getProtocolVersion() {
return this.zzc;
}
@NonNull
public List<Transport> getTransports() {
return this.zzd;
}
public int getVersionCode() {
return this.zza;
}
public int hashCode() {
return Objects.hashCode(Integer.valueOf(Arrays.hashCode(this.zzb)), this.zzc, this.zzd);
}
@NonNull
public JSONObject toJson() {
return zza();
}
@NonNull
public String toString() {
List list = this.zzd;
return String.format("{keyHandle: %s, version: %s, transports: %s}", Base64Utils.encode(this.zzb), this.zzc, list == null ? "null" : list.toString());
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, getVersionCode());
SafeParcelWriter.writeByteArray(parcel, 2, getBytes(), false);
SafeParcelWriter.writeString(parcel, 3, this.zzc.toString(), false);
SafeParcelWriter.writeTypedList(parcel, 4, getTransports(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
@NonNull
public final JSONObject zza() {
JSONObject jSONObject = new JSONObject();
try {
byte[] bArr = this.zzb;
if (bArr != null) {
jSONObject.put(SignResponseData.JSON_RESPONSE_DATA_KEY_HANDLE, Base64.encodeToString(bArr, 11));
}
ProtocolVersion protocolVersion = this.zzc;
if (protocolVersion != null) {
jSONObject.put("version", protocolVersion.toString());
}
if (this.zzd != null) {
JSONArray jSONArray = new JSONArray();
Iterator it = this.zzd.iterator();
while (it.hasNext()) {
jSONArray.put(((Transport) it.next()).toString());
}
jSONObject.put("transports", jSONArray);
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
public KeyHandle(@NonNull byte[] bArr, @NonNull ProtocolVersion protocolVersion, @Nullable List<Transport> list) {
this.zza = 1;
this.zzb = bArr;
this.zzc = protocolVersion;
this.zzd = list;
}
}

View File

@@ -0,0 +1,90 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import com.google.android.gms.fido.u2f.api.common.ProtocolVersion;
import java.io.UnsupportedEncodingException;
@Deprecated
/* loaded from: classes2.dex */
public enum ProtocolVersion implements Parcelable {
UNKNOWN("UNKNOWN"),
V1("U2F_V1"),
V2("U2F_V2");
@NonNull
public static final Parcelable.Creator<ProtocolVersion> CREATOR = new Parcelable.Creator() { // from class: com.google.android.gms.fido.u2f.api.common.zzf
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
try {
return ProtocolVersion.fromString(parcel.readString());
} catch (ProtocolVersion.UnsupportedProtocolException e) {
throw new RuntimeException(e);
}
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new ProtocolVersion[i];
}
};
private final String zzb;
public static class UnsupportedProtocolException extends Exception {
public UnsupportedProtocolException(@NonNull String str) {
super(String.format("Protocol version %s not supported", str));
}
}
ProtocolVersion(String str) {
this.zzb = str;
}
@NonNull
public static ProtocolVersion fromBytes(@NonNull byte[] bArr) throws UnsupportedProtocolException {
try {
return fromString(new String(bArr, "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
@NonNull
public static ProtocolVersion fromString(@NonNull String str) throws UnsupportedProtocolException {
if (str == null) {
return UNKNOWN;
}
for (ProtocolVersion protocolVersion : values()) {
if (str.equals(protocolVersion.zzb)) {
return protocolVersion;
}
}
throw new UnsupportedProtocolException(str);
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public boolean isCompatible(@NonNull ProtocolVersion protocolVersion) {
ProtocolVersion protocolVersion2 = UNKNOWN;
if (equals(protocolVersion2) || protocolVersion.equals(protocolVersion2)) {
return true;
}
return equals(protocolVersion);
}
@Override // java.lang.Enum
@NonNull
public String toString() {
return this.zzb;
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
parcel.writeString(this.zzb);
}
}

View File

@@ -0,0 +1,148 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.fido.u2f.api.common.ProtocolVersion;
import java.util.Arrays;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "RegisterRequestCreator")
@Deprecated
/* loaded from: classes2.dex */
public class RegisterRequest extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<RegisterRequest> CREATOR = new zzg();
public static final int U2F_V1_CHALLENGE_BYTE_LENGTH = 65;
@SafeParcelable.VersionField(getter = "getVersionCode", id = 1)
private final int zza;
@SafeParcelable.Field(getter = "getProtocolVersionAsString", id = 2, type = "java.lang.String")
private final ProtocolVersion zzb;
@SafeParcelable.Field(getter = "getChallengeValue", id = 3)
private final byte[] zzc;
@SafeParcelable.Field(getter = "getAppId", id = 4)
private final String zzd;
@SafeParcelable.Constructor
public RegisterRequest(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) String str, @SafeParcelable.Param(id = 3) byte[] bArr, @SafeParcelable.Param(id = 4) String str2) {
this.zza = i;
try {
this.zzb = ProtocolVersion.fromString(str);
this.zzc = bArr;
this.zzd = str2;
} catch (ProtocolVersion.UnsupportedProtocolException e) {
throw new IllegalArgumentException(e);
}
}
@NonNull
public static RegisterRequest parseFromJson(@NonNull JSONObject jSONObject) throws JSONException {
try {
try {
try {
return new RegisterRequest(ProtocolVersion.fromString(jSONObject.has("version") ? jSONObject.getString("version") : null), Base64.decode(jSONObject.getString(ClientData.KEY_CHALLENGE), 8), jSONObject.has("appId") ? jSONObject.getString("appId") : null);
} catch (IllegalArgumentException e) {
throw new JSONException(e.getMessage());
}
} catch (IllegalArgumentException e2) {
throw new JSONException(e2.toString());
}
} catch (ProtocolVersion.UnsupportedProtocolException e3) {
throw new JSONException(e3.toString());
}
}
public boolean equals(@NonNull Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof RegisterRequest)) {
return false;
}
RegisterRequest registerRequest = (RegisterRequest) obj;
if (!Arrays.equals(this.zzc, registerRequest.zzc) || this.zzb != registerRequest.zzb) {
return false;
}
String str = this.zzd;
if (str == null) {
if (registerRequest.zzd != null) {
return false;
}
} else if (!str.equals(registerRequest.zzd)) {
return false;
}
return true;
}
@NonNull
public String getAppId() {
return this.zzd;
}
@NonNull
public byte[] getChallengeValue() {
return this.zzc;
}
@NonNull
public ProtocolVersion getProtocolVersion() {
return this.zzb;
}
public int getVersionCode() {
return this.zza;
}
public int hashCode() {
int hashCode = ((Arrays.hashCode(this.zzc) + 31) * 31) + this.zzb.hashCode();
String str = this.zzd;
return (hashCode * 31) + (str == null ? 0 : str.hashCode());
}
@NonNull
public JSONObject toJson() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("version", this.zzb.toString());
jSONObject.put(ClientData.KEY_CHALLENGE, Base64.encodeToString(this.zzc, 11));
String str = this.zzd;
if (str != null) {
jSONObject.put("appId", str);
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, getVersionCode());
SafeParcelWriter.writeString(parcel, 2, this.zzb.toString(), false);
SafeParcelWriter.writeByteArray(parcel, 3, getChallengeValue(), false);
SafeParcelWriter.writeString(parcel, 4, getAppId(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public RegisterRequest(@NonNull ProtocolVersion protocolVersion, @NonNull byte[] bArr, @NonNull String str) {
this.zza = 1;
this.zzb = (ProtocolVersion) Preconditions.checkNotNull(protocolVersion);
this.zzc = (byte[]) Preconditions.checkNotNull(bArr);
if (protocolVersion == ProtocolVersion.V1) {
Preconditions.checkArgument(bArr.length == 65, "invalid challengeValue length for V1");
}
this.zzd = str;
}
}

View File

@@ -0,0 +1,215 @@
package com.google.android.gms.fido.u2f.api.common;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@SafeParcelable.Class(creator = "RegisterRequestParamsCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class RegisterRequestParams extends RequestParams {
@NonNull
public static final Parcelable.Creator<RegisterRequestParams> CREATOR = new zzh();
public static final int MAX_DISPLAY_HINT_LENGTH = 80;
@SafeParcelable.Field(getter = "getRequestId", id = 2)
private final Integer zza;
@SafeParcelable.Field(getter = "getTimeoutSeconds", id = 3)
private final Double zzb;
@SafeParcelable.Field(getter = "getAppId", id = 4)
private final Uri zzc;
@SafeParcelable.Field(getter = "getRegisterRequests", id = 5)
private final List zzd;
@SafeParcelable.Field(getter = "getRegisteredKeys", id = 6)
private final List zze;
@SafeParcelable.Field(getter = "getChannelIdValue", id = 7)
private final ChannelIdValue zzf;
@SafeParcelable.Field(getter = "getDisplayHint", id = 8)
private final String zzg;
private Set zzh;
public static final class Builder {
Integer zza;
Double zzb;
Uri zzc;
List zzd;
List zze;
ChannelIdValue zzf;
String zzg;
@NonNull
public RegisterRequestParams build() {
return new RegisterRequestParams(this.zza, this.zzb, this.zzc, this.zzd, this.zze, this.zzf, this.zzg);
}
@NonNull
public Builder setAppId(@NonNull Uri uri) {
this.zzc = uri;
return this;
}
@NonNull
public Builder setChannelIdValue(@NonNull ChannelIdValue channelIdValue) {
this.zzf = channelIdValue;
return this;
}
@NonNull
public Builder setDisplayHint(@NonNull String str) {
this.zzg = str;
return this;
}
@NonNull
public Builder setRegisterRequests(@NonNull List<RegisterRequest> list) {
this.zzd = list;
return this;
}
@NonNull
public Builder setRegisteredKeys(@NonNull List<RegisteredKey> list) {
this.zze = list;
return this;
}
@NonNull
public Builder setRequestId(@NonNull Integer num) {
this.zza = num;
return this;
}
@NonNull
public Builder setTimeoutSeconds(@NonNull Double d) {
this.zzb = d;
return this;
}
}
@SafeParcelable.Constructor
public RegisterRequestParams(@SafeParcelable.Param(id = 2) Integer num, @SafeParcelable.Param(id = 3) Double d, @SafeParcelable.Param(id = 4) Uri uri, @SafeParcelable.Param(id = 5) List list, @SafeParcelable.Param(id = 6) List list2, @SafeParcelable.Param(id = 7) ChannelIdValue channelIdValue, @SafeParcelable.Param(id = 8) String str) {
this.zza = num;
this.zzb = d;
this.zzc = uri;
Preconditions.checkArgument((list == null || list.isEmpty()) ? false : true, "empty list of register requests is provided");
this.zzd = list;
this.zze = list2;
this.zzf = channelIdValue;
HashSet hashSet = new HashSet();
if (uri != null) {
hashSet.add(uri);
}
Iterator it = list.iterator();
while (it.hasNext()) {
RegisterRequest registerRequest = (RegisterRequest) it.next();
Preconditions.checkArgument((uri == null && registerRequest.getAppId() == null) ? false : true, "register request has null appId and no request appId is provided");
if (registerRequest.getAppId() != null) {
hashSet.add(Uri.parse(registerRequest.getAppId()));
}
}
Iterator it2 = list2.iterator();
while (it2.hasNext()) {
RegisteredKey registeredKey = (RegisteredKey) it2.next();
Preconditions.checkArgument((uri == null && registeredKey.getAppId() == null) ? false : true, "registered key has null appId and no request appId is provided");
if (registeredKey.getAppId() != null) {
hashSet.add(Uri.parse(registeredKey.getAppId()));
}
}
this.zzh = hashSet;
Preconditions.checkArgument(str == null || str.length() <= 80, "Display Hint cannot be longer than 80 characters");
this.zzg = str;
}
public boolean equals(@NonNull Object obj) {
List list;
List list2;
if (this == obj) {
return true;
}
if (!(obj instanceof RegisterRequestParams)) {
return false;
}
RegisterRequestParams registerRequestParams = (RegisterRequestParams) obj;
return Objects.equal(this.zza, registerRequestParams.zza) && Objects.equal(this.zzb, registerRequestParams.zzb) && Objects.equal(this.zzc, registerRequestParams.zzc) && Objects.equal(this.zzd, registerRequestParams.zzd) && (((list = this.zze) == null && registerRequestParams.zze == null) || (list != null && (list2 = registerRequestParams.zze) != null && list.containsAll(list2) && registerRequestParams.zze.containsAll(this.zze))) && Objects.equal(this.zzf, registerRequestParams.zzf) && Objects.equal(this.zzg, registerRequestParams.zzg);
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Set<Uri> getAllAppIds() {
return this.zzh;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Uri getAppId() {
return this.zzc;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public ChannelIdValue getChannelIdValue() {
return this.zzf;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public String getDisplayHint() {
return this.zzg;
}
@NonNull
public List<RegisterRequest> getRegisterRequests() {
return this.zzd;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public List<RegisteredKey> getRegisteredKeys() {
return this.zze;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Integer getRequestId() {
return this.zza;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Double getTimeoutSeconds() {
return this.zzb;
}
public int hashCode() {
return Objects.hashCode(this.zza, this.zzc, this.zzb, this.zzd, this.zze, this.zzf, this.zzg);
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeIntegerObject(parcel, 2, getRequestId(), false);
SafeParcelWriter.writeDoubleObject(parcel, 3, getTimeoutSeconds(), false);
SafeParcelWriter.writeParcelable(parcel, 4, getAppId(), i, false);
SafeParcelWriter.writeTypedList(parcel, 5, getRegisterRequests(), false);
SafeParcelWriter.writeTypedList(parcel, 6, getRegisteredKeys(), false);
SafeParcelWriter.writeParcelable(parcel, 7, getChannelIdValue(), i, false);
SafeParcelWriter.writeString(parcel, 8, getDisplayHint(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
}

View File

@@ -0,0 +1,147 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.fido.u2f.api.common.ProtocolVersion;
import com.google.android.gms.internal.fido.zzbi;
import com.google.android.gms.internal.fido.zzbj;
import com.google.android.gms.internal.fido.zzgf;
import java.util.Arrays;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "RegisterResponseDataCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class RegisterResponseData extends ResponseData {
@NonNull
public static final Parcelable.Creator<RegisterResponseData> CREATOR = new zzi();
@SafeParcelable.Field(getter = "getRegisterData", id = 2)
private final byte[] zza;
@SafeParcelable.Field(getter = "getProtocolVersionAsString", id = 3, type = "java.lang.String")
private final ProtocolVersion zzb;
@Nullable
@SafeParcelable.Field(getter = "getClientDataString", id = 4)
private final String zzc;
public RegisterResponseData(@NonNull byte[] bArr) {
this.zza = (byte[]) Preconditions.checkNotNull(bArr);
this.zzb = ProtocolVersion.V1;
this.zzc = null;
}
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof RegisterResponseData)) {
return false;
}
RegisterResponseData registerResponseData = (RegisterResponseData) obj;
return Objects.equal(this.zzb, registerResponseData.zzb) && Arrays.equals(this.zza, registerResponseData.zza) && Objects.equal(this.zzc, registerResponseData.zzc);
}
@NonNull
public String getClientDataString() {
return this.zzc;
}
@NonNull
public ProtocolVersion getProtocolVersion() {
return this.zzb;
}
@NonNull
public byte[] getRegisterData() {
return this.zza;
}
public int getVersionCode() {
ProtocolVersion protocolVersion = ProtocolVersion.UNKNOWN;
int ordinal = this.zzb.ordinal();
int i = 1;
if (ordinal != 1) {
i = 2;
if (ordinal != 2) {
return -1;
}
}
return i;
}
public int hashCode() {
return Objects.hashCode(this.zzb, Integer.valueOf(Arrays.hashCode(this.zza)), this.zzc);
}
@Override // com.google.android.gms.fido.u2f.api.common.ResponseData
@NonNull
public JSONObject toJsonObject() {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("registrationData", Base64.encodeToString(this.zza, 11));
jSONObject.put("version", this.zzb.toString());
String str = this.zzc;
if (str != null) {
jSONObject.put(SignResponseData.JSON_RESPONSE_DATA_CLIENT_DATA, Base64.encodeToString(str.getBytes(), 11));
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String toString() {
zzbi zza = zzbj.zza(this);
zza.zzb("protocolVersion", this.zzb);
zzgf zzf = zzgf.zzf();
byte[] bArr = this.zza;
zza.zzb("registerData", zzf.zzg(bArr, 0, bArr.length));
String str = this.zzc;
if (str != null) {
zza.zzb("clientDataString", str);
}
return zza.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeByteArray(parcel, 2, getRegisterData(), false);
SafeParcelWriter.writeString(parcel, 3, this.zzb.toString(), false);
SafeParcelWriter.writeString(parcel, 4, getClientDataString(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public RegisterResponseData(@NonNull byte[] bArr, @NonNull ProtocolVersion protocolVersion, @Nullable String str) {
this.zza = (byte[]) Preconditions.checkNotNull(bArr);
this.zzb = (ProtocolVersion) Preconditions.checkNotNull(protocolVersion);
Preconditions.checkArgument(protocolVersion != ProtocolVersion.UNKNOWN);
if (protocolVersion == ProtocolVersion.V1) {
Preconditions.checkArgument(str == null);
this.zzc = null;
} else {
this.zzc = (String) Preconditions.checkNotNull(str);
}
}
@SafeParcelable.Constructor
public RegisterResponseData(@SafeParcelable.Param(id = 2) byte[] bArr, @SafeParcelable.Param(id = 3) String str, @Nullable @SafeParcelable.Param(id = 4) String str2) {
this.zza = bArr;
try {
this.zzb = ProtocolVersion.fromString(str);
this.zzc = str2;
} catch (ProtocolVersion.UnsupportedProtocolException e) {
throw new IllegalArgumentException(e);
}
}
}

View File

@@ -0,0 +1,158 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "RegisteredKeyCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class RegisteredKey extends AbstractSafeParcelable {
@NonNull
public static final Parcelable.Creator<RegisteredKey> CREATOR = new zzj();
@SafeParcelable.Field(getter = "getChallengeValue", id = 3)
String zza;
@SafeParcelable.Field(getter = "getKeyHandle", id = 2)
private final KeyHandle zzb;
@SafeParcelable.Field(getter = "getAppId", id = 4)
private final String zzc;
public RegisteredKey(@NonNull KeyHandle keyHandle) {
this(keyHandle, null, null);
}
@NonNull
public static RegisteredKey parseFromJson(@NonNull JSONObject jSONObject) throws JSONException {
return new RegisteredKey(KeyHandle.parseFromJson(jSONObject), jSONObject.has(ClientData.KEY_CHALLENGE) ? jSONObject.getString(ClientData.KEY_CHALLENGE) : null, jSONObject.has("appId") ? jSONObject.getString("appId") : null);
}
public boolean equals(@NonNull Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof RegisteredKey)) {
return false;
}
RegisteredKey registeredKey = (RegisteredKey) obj;
String str = this.zza;
if (str == null) {
if (registeredKey.zza != null) {
return false;
}
} else if (!str.equals(registeredKey.zza)) {
return false;
}
if (!this.zzb.equals(registeredKey.zzb)) {
return false;
}
String str2 = this.zzc;
if (str2 == null) {
if (registeredKey.zzc != null) {
return false;
}
} else if (!str2.equals(registeredKey.zzc)) {
return false;
}
return true;
}
@NonNull
public String getAppId() {
return this.zzc;
}
@NonNull
public String getChallengeValue() {
return this.zza;
}
@NonNull
public KeyHandle getKeyHandle() {
return this.zzb;
}
public int hashCode() {
String str = this.zza;
int hashCode = (((str == null ? 0 : str.hashCode()) + 31) * 31) + this.zzb.hashCode();
String str2 = this.zzc;
return (hashCode * 31) + (str2 != null ? str2.hashCode() : 0);
}
@NonNull
public JSONObject toJson() {
JSONObject jSONObject = new JSONObject();
try {
String str = this.zza;
if (str != null) {
jSONObject.put(ClientData.KEY_CHALLENGE, str);
}
JSONObject zza = this.zzb.zza();
Iterator<String> keys = zza.keys();
while (keys.hasNext()) {
String next = keys.next();
jSONObject.put(next, zza.get(next));
}
String str2 = this.zzc;
if (str2 != null) {
jSONObject.put("appId", str2);
}
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String toString() {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put(SignResponseData.JSON_RESPONSE_DATA_KEY_HANDLE, Base64.encodeToString(this.zzb.getBytes(), 11));
if (this.zzb.getProtocolVersion() != ProtocolVersion.UNKNOWN) {
jSONObject.put("version", this.zzb.getProtocolVersion().toString());
}
if (this.zzb.getTransports() != null) {
jSONObject.put("transports", this.zzb.getTransports().toString());
}
String str = this.zza;
if (str != null) {
jSONObject.put(ClientData.KEY_CHALLENGE, str);
}
String str2 = this.zzc;
if (str2 != null) {
jSONObject.put("appId", str2);
}
return jSONObject.toString();
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeParcelable(parcel, 2, getKeyHandle(), i, false);
SafeParcelWriter.writeString(parcel, 3, getChallengeValue(), false);
SafeParcelWriter.writeString(parcel, 4, getAppId(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
@SafeParcelable.Constructor
public RegisteredKey(@NonNull @SafeParcelable.Param(id = 2) KeyHandle keyHandle, @NonNull @SafeParcelable.Param(id = 3) String str, @NonNull @SafeParcelable.Param(id = 4) String str2) {
this.zzb = (KeyHandle) Preconditions.checkNotNull(keyHandle);
this.zza = str;
this.zzc = str2;
}
}

View File

@@ -0,0 +1,33 @@
package com.google.android.gms.fido.u2f.api.common;
import android.net.Uri;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.ReflectedParcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import java.util.List;
import java.util.Set;
@Deprecated
/* loaded from: classes2.dex */
public abstract class RequestParams extends AbstractSafeParcelable implements ReflectedParcelable {
@NonNull
public abstract Set<Uri> getAllAppIds();
@NonNull
public abstract Uri getAppId();
@NonNull
public abstract ChannelIdValue getChannelIdValue();
@NonNull
public abstract String getDisplayHint();
@NonNull
public abstract List<RegisteredKey> getRegisteredKeys();
@NonNull
public abstract Integer getRequestId();
@NonNull
public abstract Double getTimeoutSeconds();
}

View File

@@ -0,0 +1,13 @@
package com.google.android.gms.fido.u2f.api.common;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.ReflectedParcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import org.json.JSONObject;
@Deprecated
/* loaded from: classes2.dex */
public abstract class ResponseData extends AbstractSafeParcelable implements ReflectedParcelable {
@NonNull
public abstract JSONObject toJsonObject();
}

View File

@@ -0,0 +1,213 @@
package com.google.android.gms.fido.u2f.api.common;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@SafeParcelable.Class(creator = "SignRequestParamsCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class SignRequestParams extends RequestParams {
@NonNull
public static final Parcelable.Creator<SignRequestParams> CREATOR = new zzk();
public static final int MAX_DISPLAY_HINT_LENGTH = 80;
@SafeParcelable.Field(getter = "getRequestId", id = 2)
private final Integer zza;
@Nullable
@SafeParcelable.Field(getter = "getTimeoutSeconds", id = 3)
private final Double zzb;
@SafeParcelable.Field(getter = "getAppId", id = 4)
private final Uri zzc;
@SafeParcelable.Field(getter = "getDefaultSignChallenge", id = 5)
private final byte[] zzd;
@SafeParcelable.Field(getter = "getRegisteredKeys", id = 6)
private final List zze;
@SafeParcelable.Field(getter = "getChannelIdValue", id = 7)
private final ChannelIdValue zzf;
@SafeParcelable.Field(getter = "getDisplayHint", id = 8)
private final String zzg;
private final Set zzh;
public static final class Builder {
Integer zza;
@Nullable
Double zzb;
Uri zzc;
byte[] zzd;
List zze;
ChannelIdValue zzf;
String zzg;
@NonNull
public SignRequestParams build() {
return new SignRequestParams(this.zza, this.zzb, this.zzc, this.zzd, this.zze, this.zzf, this.zzg);
}
@NonNull
public Builder setAppId(@NonNull Uri uri) {
this.zzc = uri;
return this;
}
@NonNull
public Builder setChannelIdValue(@NonNull ChannelIdValue channelIdValue) {
this.zzf = channelIdValue;
return this;
}
@NonNull
public Builder setDefaultSignChallenge(@NonNull byte[] bArr) {
this.zzd = bArr;
return this;
}
@NonNull
public Builder setDisplayHint(@NonNull String str) {
this.zzg = str;
return this;
}
@NonNull
public Builder setRegisteredKeys(@NonNull List<RegisteredKey> list) {
this.zze = list;
return this;
}
@NonNull
public Builder setRequestId(@NonNull Integer num) {
this.zza = num;
return this;
}
@NonNull
public Builder setTimeoutSeconds(@Nullable Double d) {
this.zzb = d;
return this;
}
}
@SafeParcelable.Constructor
public SignRequestParams(@SafeParcelable.Param(id = 2) Integer num, @Nullable @SafeParcelable.Param(id = 3) Double d, @SafeParcelable.Param(id = 4) Uri uri, @SafeParcelable.Param(id = 5) byte[] bArr, @SafeParcelable.Param(id = 6) List list, @SafeParcelable.Param(id = 7) ChannelIdValue channelIdValue, @SafeParcelable.Param(id = 8) String str) {
this.zza = num;
this.zzb = d;
this.zzc = uri;
this.zzd = bArr;
this.zze = list;
this.zzf = channelIdValue;
HashSet hashSet = new HashSet();
if (uri != null) {
hashSet.add(uri);
}
if (list != null) {
Iterator it = list.iterator();
while (it.hasNext()) {
RegisteredKey registeredKey = (RegisteredKey) it.next();
Preconditions.checkArgument((registeredKey.getAppId() == null && uri == null) ? false : true, "registered key has null appId and no request appId is provided");
registeredKey.getChallengeValue();
Preconditions.checkArgument(true, "register request has null challenge and no default challenge isprovided");
if (registeredKey.getAppId() != null) {
hashSet.add(Uri.parse(registeredKey.getAppId()));
}
}
}
this.zzh = hashSet;
Preconditions.checkArgument(str == null || str.length() <= 80, "Display Hint cannot be longer than 80 characters");
this.zzg = str;
}
public boolean equals(@NonNull Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof SignRequestParams)) {
return false;
}
SignRequestParams signRequestParams = (SignRequestParams) obj;
return Objects.equal(this.zza, signRequestParams.zza) && Objects.equal(this.zzb, signRequestParams.zzb) && Objects.equal(this.zzc, signRequestParams.zzc) && Arrays.equals(this.zzd, signRequestParams.zzd) && this.zze.containsAll(signRequestParams.zze) && signRequestParams.zze.containsAll(this.zze) && Objects.equal(this.zzf, signRequestParams.zzf) && Objects.equal(this.zzg, signRequestParams.zzg);
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Set<Uri> getAllAppIds() {
return this.zzh;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Uri getAppId() {
return this.zzc;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public ChannelIdValue getChannelIdValue() {
return this.zzf;
}
@NonNull
public byte[] getDefaultSignChallenge() {
return this.zzd;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public String getDisplayHint() {
return this.zzg;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public List<RegisteredKey> getRegisteredKeys() {
return this.zze;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@NonNull
public Integer getRequestId() {
return this.zza;
}
@Override // com.google.android.gms.fido.u2f.api.common.RequestParams
@Nullable
public Double getTimeoutSeconds() {
return this.zzb;
}
public int hashCode() {
return Objects.hashCode(this.zza, this.zzc, this.zzb, this.zze, this.zzf, this.zzg, Integer.valueOf(Arrays.hashCode(this.zzd)));
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeIntegerObject(parcel, 2, getRequestId(), false);
SafeParcelWriter.writeDoubleObject(parcel, 3, getTimeoutSeconds(), false);
SafeParcelWriter.writeParcelable(parcel, 4, getAppId(), i, false);
SafeParcelWriter.writeByteArray(parcel, 5, getDefaultSignChallenge(), false);
SafeParcelWriter.writeTypedList(parcel, 6, getRegisteredKeys(), false);
SafeParcelWriter.writeParcelable(parcel, 7, getChannelIdValue(), i, false);
SafeParcelWriter.writeString(parcel, 8, getDisplayHint(), false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
}

View File

@@ -0,0 +1,132 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.internal.fido.zzbi;
import com.google.android.gms.internal.fido.zzbj;
import com.google.android.gms.internal.fido.zzgf;
import java.util.Arrays;
import org.json.JSONException;
import org.json.JSONObject;
@SafeParcelable.Class(creator = "SignResponseDataCreator")
@SafeParcelable.Reserved({1})
@Deprecated
/* loaded from: classes2.dex */
public class SignResponseData extends ResponseData {
@NonNull
public static final Parcelable.Creator<SignResponseData> CREATOR = new zzl();
@NonNull
@VisibleForTesting
public static final String JSON_RESPONSE_DATA_CLIENT_DATA = "clientData";
@NonNull
@VisibleForTesting
public static final String JSON_RESPONSE_DATA_KEY_HANDLE = "keyHandle";
@NonNull
@VisibleForTesting
public static final String JSON_RESPONSE_DATA_SIGNATURE_DATA = "signatureData";
@SafeParcelable.Field(getter = "getKeyHandle", id = 2)
private final byte[] zza;
@SafeParcelable.Field(getter = "getClientDataString", id = 3)
private final String zzb;
@SafeParcelable.Field(getter = "getSignatureData", id = 4)
private final byte[] zzc;
@SafeParcelable.Field(getter = "getApplication", id = 5)
private final byte[] zzd;
@Deprecated
public SignResponseData(@NonNull byte[] bArr, @NonNull String str, @NonNull byte[] bArr2) {
this(bArr, str, bArr2, new byte[0]);
}
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof SignResponseData)) {
return false;
}
SignResponseData signResponseData = (SignResponseData) obj;
return Arrays.equals(this.zza, signResponseData.zza) && Objects.equal(this.zzb, signResponseData.zzb) && Arrays.equals(this.zzc, signResponseData.zzc) && Arrays.equals(this.zzd, signResponseData.zzd);
}
@NonNull
public String getClientDataString() {
return this.zzb;
}
@NonNull
public byte[] getKeyHandle() {
return this.zza;
}
@NonNull
public byte[] getSignatureData() {
return this.zzc;
}
public int hashCode() {
return Objects.hashCode(Integer.valueOf(Arrays.hashCode(this.zza)), this.zzb, Integer.valueOf(Arrays.hashCode(this.zzc)), Integer.valueOf(Arrays.hashCode(this.zzd)));
}
@Override // com.google.android.gms.fido.u2f.api.common.ResponseData
@NonNull
public JSONObject toJsonObject() {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put(JSON_RESPONSE_DATA_KEY_HANDLE, Base64.encodeToString(this.zza, 11));
jSONObject.put(JSON_RESPONSE_DATA_CLIENT_DATA, Base64.encodeToString(this.zzb.getBytes(), 11));
jSONObject.put(JSON_RESPONSE_DATA_SIGNATURE_DATA, Base64.encodeToString(this.zzc, 11));
return jSONObject;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
@NonNull
public String toString() {
zzbi zza = zzbj.zza(this);
zzgf zzf = zzgf.zzf();
byte[] bArr = this.zza;
zza.zzb(JSON_RESPONSE_DATA_KEY_HANDLE, zzf.zzg(bArr, 0, bArr.length));
zza.zzb("clientDataString", this.zzb);
zzgf zzf2 = zzgf.zzf();
byte[] bArr2 = this.zzc;
zza.zzb(JSON_RESPONSE_DATA_SIGNATURE_DATA, zzf2.zzg(bArr2, 0, bArr2.length));
zzgf zzf3 = zzgf.zzf();
byte[] bArr3 = this.zzd;
zza.zzb("application", zzf3.zzg(bArr3, 0, bArr3.length));
return zza.toString();
}
@Override // android.os.Parcelable
public void writeToParcel(@NonNull Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeByteArray(parcel, 2, getKeyHandle(), false);
SafeParcelWriter.writeString(parcel, 3, getClientDataString(), false);
SafeParcelWriter.writeByteArray(parcel, 4, getSignatureData(), false);
SafeParcelWriter.writeByteArray(parcel, 5, this.zzd, false);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
@SafeParcelable.Constructor
public SignResponseData(@NonNull @SafeParcelable.Param(id = 2) byte[] bArr, @NonNull @SafeParcelable.Param(id = 3) String str, @NonNull @SafeParcelable.Param(id = 4) byte[] bArr2, @NonNull @SafeParcelable.Param(id = 5) byte[] bArr3) {
this.zza = (byte[]) Preconditions.checkNotNull(bArr);
this.zzb = (String) Preconditions.checkNotNull(str);
this.zzc = (byte[]) Preconditions.checkNotNull(bArr2);
this.zzd = (byte[]) Preconditions.checkNotNull(bArr3);
}
}

View File

@@ -0,0 +1,22 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.fido.u2f.api.common.ChannelIdValue;
/* loaded from: classes2.dex */
final class zza implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
try {
return ChannelIdValue.toChannelIdValueType(parcel.readInt());
} catch (ChannelIdValue.UnsupportedChannelIdValueTypeException e) {
throw new RuntimeException(e);
}
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new ChannelIdValue.ChannelIdValueType[i];
}
}

View File

@@ -0,0 +1,36 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzb implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
String str = null;
int i = 0;
String str2 = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 2) {
i = SafeParcelReader.readInt(parcel, readHeader);
} else if (fieldId == 3) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId != 4) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
str2 = SafeParcelReader.createString(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new ChannelIdValue(i, str, str2);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new ChannelIdValue[i];
}
}

View File

@@ -0,0 +1,33 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzd implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
String str = null;
int i = 0;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 2) {
i = SafeParcelReader.readInt(parcel, readHeader);
} else if (fieldId != 3) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
str = SafeParcelReader.createString(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new ErrorResponseData(i, str);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new ErrorResponseData[i];
}
}

View File

@@ -0,0 +1,41 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import com.google.android.gms.fido.common.Transport;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class zze implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
byte[] bArr = null;
ArrayList arrayList = null;
int i = 0;
String str = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 1) {
i = SafeParcelReader.readInt(parcel, readHeader);
} else if (fieldId == 2) {
bArr = SafeParcelReader.createByteArray(parcel, readHeader);
} else if (fieldId == 3) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId != 4) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
arrayList = SafeParcelReader.createTypedList(parcel, readHeader, Transport.CREATOR);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new KeyHandle(i, bArr, str, arrayList);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new KeyHandle[i];
}
}

View File

@@ -0,0 +1,39 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzg implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
String str = null;
String str2 = null;
int i = 0;
byte[] bArr = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 1) {
i = SafeParcelReader.readInt(parcel, readHeader);
} else if (fieldId == 2) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId == 3) {
bArr = SafeParcelReader.createByteArray(parcel, readHeader);
} else if (fieldId != 4) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
str2 = SafeParcelReader.createString(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new RegisterRequest(i, str, bArr, str2);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new RegisterRequest[i];
}
}

View File

@@ -0,0 +1,58 @@
package com.google.android.gms.fido.u2f.api.common;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class zzh implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
Integer num = null;
Double d = null;
Uri uri = null;
ArrayList arrayList = null;
ArrayList arrayList2 = null;
ChannelIdValue channelIdValue = null;
String str = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
switch (SafeParcelReader.getFieldId(readHeader)) {
case 2:
num = SafeParcelReader.readIntegerObject(parcel, readHeader);
break;
case 3:
d = SafeParcelReader.readDoubleObject(parcel, readHeader);
break;
case 4:
uri = (Uri) SafeParcelReader.createParcelable(parcel, readHeader, Uri.CREATOR);
break;
case 5:
arrayList = SafeParcelReader.createTypedList(parcel, readHeader, RegisterRequest.CREATOR);
break;
case 6:
arrayList2 = SafeParcelReader.createTypedList(parcel, readHeader, RegisteredKey.CREATOR);
break;
case 7:
channelIdValue = (ChannelIdValue) SafeParcelReader.createParcelable(parcel, readHeader, ChannelIdValue.CREATOR);
break;
case 8:
str = SafeParcelReader.createString(parcel, readHeader);
break;
default:
SafeParcelReader.skipUnknownField(parcel, readHeader);
break;
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new RegisterRequestParams(num, d, uri, arrayList, arrayList2, channelIdValue, str);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new RegisterRequestParams[i];
}
}

View File

@@ -0,0 +1,36 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzi implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
byte[] bArr = null;
String str = null;
String str2 = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 2) {
bArr = SafeParcelReader.createByteArray(parcel, readHeader);
} else if (fieldId == 3) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId != 4) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
str2 = SafeParcelReader.createString(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new RegisterResponseData(bArr, str, str2);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new RegisterResponseData[i];
}
}

View File

@@ -0,0 +1,36 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzj implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
KeyHandle keyHandle = null;
String str = null;
String str2 = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 2) {
keyHandle = (KeyHandle) SafeParcelReader.createParcelable(parcel, readHeader, KeyHandle.CREATOR);
} else if (fieldId == 3) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId != 4) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
str2 = SafeParcelReader.createString(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new RegisteredKey(keyHandle, str, str2);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new RegisteredKey[i];
}
}

View File

@@ -0,0 +1,58 @@
package com.google.android.gms.fido.u2f.api.common;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class zzk implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
Integer num = null;
Double d = null;
Uri uri = null;
byte[] bArr = null;
ArrayList arrayList = null;
ChannelIdValue channelIdValue = null;
String str = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
switch (SafeParcelReader.getFieldId(readHeader)) {
case 2:
num = SafeParcelReader.readIntegerObject(parcel, readHeader);
break;
case 3:
d = SafeParcelReader.readDoubleObject(parcel, readHeader);
break;
case 4:
uri = (Uri) SafeParcelReader.createParcelable(parcel, readHeader, Uri.CREATOR);
break;
case 5:
bArr = SafeParcelReader.createByteArray(parcel, readHeader);
break;
case 6:
arrayList = SafeParcelReader.createTypedList(parcel, readHeader, RegisteredKey.CREATOR);
break;
case 7:
channelIdValue = (ChannelIdValue) SafeParcelReader.createParcelable(parcel, readHeader, ChannelIdValue.CREATOR);
break;
case 8:
str = SafeParcelReader.createString(parcel, readHeader);
break;
default:
SafeParcelReader.skipUnknownField(parcel, readHeader);
break;
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new SignRequestParams(num, d, uri, bArr, arrayList, channelIdValue, str);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new SignRequestParams[i];
}
}

View File

@@ -0,0 +1,39 @@
package com.google.android.gms.fido.u2f.api.common;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* loaded from: classes2.dex */
public final class zzl implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
byte[] bArr = null;
String str = null;
byte[] bArr2 = null;
byte[] bArr3 = null;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(readHeader);
if (fieldId == 2) {
bArr = SafeParcelReader.createByteArray(parcel, readHeader);
} else if (fieldId == 3) {
str = SafeParcelReader.createString(parcel, readHeader);
} else if (fieldId == 4) {
bArr2 = SafeParcelReader.createByteArray(parcel, readHeader);
} else if (fieldId != 5) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
bArr3 = SafeParcelReader.createByteArray(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new SignResponseData(bArr, str, bArr2, bArr3);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new SignResponseData[i];
}
}

View File

@@ -0,0 +1,38 @@
package com.google.android.gms.fido.u2f.api.messagebased;
import androidx.annotation.NonNull;
@Deprecated
/* loaded from: classes2.dex */
public enum RequestType {
REGISTER("u2f_register_request"),
SIGN("u2f_sign_request");
private final String zzb;
public static class UnsupportedRequestTypeException extends Exception {
public UnsupportedRequestTypeException(@NonNull String str) {
super("Unsupported request type ".concat(String.valueOf(str)));
}
}
RequestType(String str) {
this.zzb = str;
}
@NonNull
public static RequestType fromString(@NonNull String str) throws UnsupportedRequestTypeException {
for (RequestType requestType : values()) {
if (str.equals(requestType.zzb)) {
return requestType;
}
}
throw new UnsupportedRequestTypeException(str);
}
@Override // java.lang.Enum
@NonNull
public String toString() {
return this.zzb;
}
}

View File

@@ -0,0 +1,38 @@
package com.google.android.gms.fido.u2f.api.messagebased;
import androidx.annotation.NonNull;
import com.google.android.gms.fido.u2f.api.messagebased.RequestType;
@Deprecated
/* loaded from: classes2.dex */
public enum ResponseType {
REGISTER("u2f_register_response"),
SIGN("u2f_sign_response");
private final String zzb;
ResponseType(String str) {
this.zzb = str;
}
@Override // java.lang.Enum
@NonNull
public String toString() {
return this.zzb;
}
@NonNull
public static ResponseType getResponseTypeForRequestType(@NonNull RequestType requestType) throws RequestType.UnsupportedRequestTypeException {
if (requestType == null) {
throw new RequestType.UnsupportedRequestTypeException(null);
}
int ordinal = requestType.ordinal();
if (ordinal == 0) {
return REGISTER;
}
if (ordinal == 1) {
return SIGN;
}
throw new RequestType.UnsupportedRequestTypeException(requestType.toString());
}
}