apkfuckery/com.discord/smali_classes2/b0/g$a.smali
2020-11-30 22:35:21 +00:00

102 lines
2.6 KiB
Smali

.class public final Lb0/g$a;
.super Ljava/lang/Object;
.source "CertificatePinner.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lb0/g;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# direct methods
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final a(Ljava/security/cert/Certificate;)Ljava/lang/String;
.locals 2
const-string v0, "certificate"
invoke-static {p1, v0}, Lx/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "sha256/"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
check-cast p1, Ljava/security/cert/X509Certificate;
invoke-virtual {p0, p1}, Lb0/g$a;->b(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
move-result-object p1
invoke-virtual {p1}, Lokio/ByteString;->f()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public final b(Ljava/security/cert/X509Certificate;)Lokio/ByteString;
.locals 3
const-string v0, "$this$sha256Hash"
invoke-static {p1, v0}, Lx/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
sget-object v0, Lokio/ByteString;->g:Lokio/ByteString$a;
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getPublicKey()Ljava/security/PublicKey;
move-result-object p1
const-string v1, "publicKey"
invoke-static {p1, v1}, Lx/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {p1}, Ljava/security/PublicKey;->getEncoded()[B
move-result-object p1
const-string v1, "publicKey.encoded"
invoke-static {p1, v1}, Lx/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v1, 0x0
const/4 v2, 0x3
invoke-static {v0, p1, v1, v1, v2}, Lokio/ByteString$a;->c(Lokio/ByteString$a;[BIII)Lokio/ByteString;
move-result-object p1
const-string v0, "SHA-256"
invoke-virtual {p1, v0}, Lokio/ByteString;->g(Ljava/lang/String;)Lokio/ByteString;
move-result-object p1
return-object p1
.end method