- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
40 lines
1.5 KiB
Java
40 lines
1.5 KiB
Java
package androidx.credentials.webauthn;
|
|
|
|
import android.content.pm.Signature;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.credentials.provider.CallingAppInfo;
|
|
import androidx.credentials.webauthn.WebAuthnUtils;
|
|
import java.security.MessageDigest;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
@RequiresApi(28)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
/* loaded from: classes.dex */
|
|
public final class WebAuthnUtilsApi28 {
|
|
public static final Companion Companion = new Companion(null);
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final String appInfoToOrigin(CallingAppInfo info) {
|
|
Signature[] apkContentsSigners;
|
|
Intrinsics.checkNotNullParameter(info, "info");
|
|
apkContentsSigners = info.getSigningInfo().getApkContentsSigners();
|
|
byte[] certHash = MessageDigest.getInstance("SHA-256").digest(apkContentsSigners[0].toByteArray());
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("android:apk-key-hash:");
|
|
WebAuthnUtils.Companion companion = WebAuthnUtils.Companion;
|
|
Intrinsics.checkNotNullExpressionValue(certHash, "certHash");
|
|
sb.append(companion.b64Encode(certHash));
|
|
return sb.toString();
|
|
}
|
|
}
|
|
}
|