Files
supermegamestre 4bbd74a497 First Upload
Just the APK
Force update disabled, will only work offline.
2026-01-26 00:26:29 -03:00

181 lines
4.1 KiB
Smali

.class public final Lcom/mbridge/msdk/foundation/tools/a;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/mbridge/msdk/foundation/tools/a$a;
}
.end annotation
# static fields
.field private static a:[B
.field private static b:[B
# direct methods
.method static constructor <clinit>()V
.locals 5
const/16 v0, 0x20
new-array v1, v0, [B
sput-object v1, Lcom/mbridge/msdk/foundation/tools/a;->b:[B
const/16 v1, 0x10
new-array v2, v1, [B
sput-object v2, Lcom/mbridge/msdk/foundation/tools/a;->a:[B
const-string v2, "HkzwDFeD4QuyLdx5igfZYcu9xTM9NN=="
.line 22
invoke-static {v2}, Lcom/mbridge/msdk/foundation/tools/z;->a(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
.line 1026
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_0
goto :goto_0
:cond_0
:try_start_0
const-string v3, "sha-384"
.line 1031
invoke-static {v3}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v3
.line 1032
invoke-virtual {v2}, Ljava/lang/String;->getBytes()[B
move-result-object v2
invoke-virtual {v3, v2}, Ljava/security/MessageDigest;->digest([B)[B
move-result-object v2
sget-object v3, Lcom/mbridge/msdk/foundation/tools/a;->b:[B
const/4 v4, 0x0
.line 1034
invoke-static {v2, v4, v3, v4, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
sget-object v3, Lcom/mbridge/msdk/foundation/tools/a;->a:[B
.line 1035
invoke-static {v2, v0, v3, v4, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
.line 1037
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
:goto_0
return-void
.end method
.method public static a(Ljava/lang/String;)Ljava/lang/String;
.locals 2
sget-object v0, Lcom/mbridge/msdk/foundation/tools/a;->b:[B
sget-object v1, Lcom/mbridge/msdk/foundation/tools/a;->a:[B
.line 79
invoke-static {p0, v0, v1}, Lcom/mbridge/msdk/foundation/tools/a;->a(Ljava/lang/String;[B[B)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method private static a(Ljava/lang/String;[B[B)Ljava/lang/String;
.locals 2
.line 86
:try_start_0
new-instance v0, Ljavax/crypto/spec/IvParameterSpec;
invoke-direct {v0, p2}, Ljavax/crypto/spec/IvParameterSpec;-><init>([B)V
.line 87
new-instance p2, Ljavax/crypto/spec/SecretKeySpec;
const-string v1, "AES"
invoke-direct {p2, p1, v1}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V
.line 89
new-instance p1, Lcom/mbridge/msdk/foundation/tools/a$a;
invoke-direct {p1}, Lcom/mbridge/msdk/foundation/tools/a$a;-><init>()V
invoke-static {p1}, Ljava/security/Security;->addProvider(Ljava/security/Provider;)I
const-string p1, "AES/CBC/PKCS7PADDING"
.line 90
invoke-static {p1}, Ljavax/crypto/Cipher;->getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;
move-result-object p1
const/4 v1, 0x1
.line 91
invoke-virtual {p1, v1, p2, v0}, Ljavax/crypto/Cipher;->init(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
.line 93
invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B
move-result-object p0
invoke-virtual {p1, p0}, Ljavax/crypto/Cipher;->doFinal([B)[B
move-result-object p0
const/4 p1, 0x0
.line 96
invoke-static {p0, p1}, Landroid/util/Base64;->encode([BI)[B
move-result-object p0
.line 98
new-instance p1, Ljava/lang/String;
invoke-direct {p1, p0}, Ljava/lang/String;-><init>([B)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p0
.line 101
invoke-virtual {p0}, Ljava/lang/Throwable;->printStackTrace()V
const/4 p0, 0x0
return-object p0
.end method