mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-04 19:48:54 +01:00
61 lines
2.9 KiB
Java
61 lines
2.9 KiB
Java
package androidx.credentials.webauthn;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.json.JSONObject;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0012\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\t\b\u0007\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\u0006\u0010\u000f\u001a\u00020\u0007R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000e¨\u0006\u0010"}, d2 = {"Landroidx/credentials/webauthn/FidoPublicKeyCredential;", "", "rawId", "", "response", "Landroidx/credentials/webauthn/AuthenticatorResponse;", "authenticatorAttachment", "", "([BLandroidx/credentials/webauthn/AuthenticatorResponse;Ljava/lang/String;)V", "getAuthenticatorAttachment", "()Ljava/lang/String;", "getRawId", "()[B", "getResponse", "()Landroidx/credentials/webauthn/AuthenticatorResponse;", "json", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
/* loaded from: classes13.dex */
|
|
public final class FidoPublicKeyCredential {
|
|
|
|
@NotNull
|
|
private final String authenticatorAttachment;
|
|
|
|
@NotNull
|
|
private final byte[] rawId;
|
|
|
|
@NotNull
|
|
private final AuthenticatorResponse response;
|
|
|
|
public FidoPublicKeyCredential(@NotNull byte[] bArr, @NotNull AuthenticatorResponse authenticatorResponse, @NotNull String str) {
|
|
bArr.getClass();
|
|
authenticatorResponse.getClass();
|
|
str.getClass();
|
|
this.rawId = bArr;
|
|
this.response = authenticatorResponse;
|
|
this.authenticatorAttachment = str;
|
|
}
|
|
|
|
@NotNull
|
|
public final String getAuthenticatorAttachment() {
|
|
return this.authenticatorAttachment;
|
|
}
|
|
|
|
@NotNull
|
|
public final byte[] getRawId() {
|
|
return this.rawId;
|
|
}
|
|
|
|
@NotNull
|
|
public final AuthenticatorResponse getResponse() {
|
|
return this.response;
|
|
}
|
|
|
|
@NotNull
|
|
public final String json() {
|
|
String b64Encode = WebAuthnUtils.INSTANCE.b64Encode(this.rawId);
|
|
JSONObject jSONObject = new JSONObject();
|
|
jSONObject.put("id", b64Encode);
|
|
jSONObject.put("rawId", b64Encode);
|
|
jSONObject.put("type", "public-key");
|
|
jSONObject.put("authenticatorAttachment", this.authenticatorAttachment);
|
|
jSONObject.put("response", this.response.json());
|
|
jSONObject.put("clientExtensionResults", new JSONObject());
|
|
String jSONObject2 = jSONObject.toString();
|
|
jSONObject2.getClass();
|
|
return jSONObject2;
|
|
}
|
|
}
|