唱吧android逆向加密算法笔记 此文章已做脱敏处理不会对原厂家app安全构成威胁,仅供学习

rsa公钥1:MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALbr6abInZtlggBiXmgwl5fEUe3KHY9sZj4bomDh+Jn9IC2CXnLaHYxBzmyoakIMWlJn43cP5bSsqZMTKmKDj/WJ125yR068L7uvm9YSQBi07hxeW+L。。。。。。。。。。。。。。。。。。。。。。脱敏处理

rsa公钥2:MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALbr6abInZtlggBiXmgwl5fEUe3KHY9sZj4bomDh+Jn9IC2CXnLaHYxBzmyoakIMWlJn43cP5bSsqZMTKmKDj/WJ125yR068L7uvm9YSQBi07hxeW+。。。。。。。。。。。。。。。。。。。。。。脱敏处理

模拟输入:ktvbox.php?ac=searchuserbynickname&_rf=zlib&clksrc=indextab&keyword=%E5%96%9C%E6%AC%A2%E4%BD%A0&curuserid=294984090&imei=866174277891087&token=T3570e73aa358681&version=10.1.3.2&macaddress=。。。。。。。。。。。。。。。。。。。。。。脱敏处理
模拟输出:kk=QetBljdWUTkRFZHZXrhWIaM-oeOsRn3Lf02SxgL-0A8OGeMMlyKPGf-qq2D8bSpFNP2QuLAXOYicZuKrk2BYXyJMHRH7LlzF4swPOYizHa7EdI_BWsD5Ii-ehHXAX0mb。。。。。。。。。。。。。。。。。。。。。。脱敏处理

###### Class com.changba.utils.NetworkEncrypt (com.changba.utils.NetworkEncrypt)
.class public Lcom/changba/utils/NetworkEncrypt;
.super Ljava/lang/Object;
.source "NetworkEncrypt.java"


# static fields
.field public static a:J = 0x0L

.field private static b:Lcom/changba/utils/NetworkEncrypt; = null

.field private static d:I = 0x2800

.field private static f:I = 0xa0


# instance fields
.field private c:Ljava/util/Random;

.field private e:Lcom/android/volley/misc/ByteArrayPool;

.field private g:Lcom/android/volley/misc/ByteArrayPool;


# direct methods
.method static constructor <clinit>()V
    .registers 3

    .line 38
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    const/4 v1, 0x1

    const/16 v2, 0x7e5

    .line 39
    invoke-virtual {v0, v2, v1, v1}, Ljava/util/Calendar;->set(III)V

    .line 40
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v0

    sput-wide v0, Lcom/changba/utils/NetworkEncrypt;->a:J

    return-void
.end method

.method private constructor <init>()V
    .registers 3

    .line 51
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 43
    new-instance v0, Ljava/util/Random;

    invoke-direct {v0}, Ljava/util/Random;-><init>()V

    iput-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->c:Ljava/util/Random;

    .line 46
    new-instance v0, Lcom/android/volley/misc/ByteArrayPool;

    sget v1, Lcom/changba/utils/NetworkEncrypt;->d:I

    invoke-direct {v0, v1}, Lcom/android/volley/misc/ByteArrayPool;-><init>(I)V

    iput-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    .line 49
    new-instance v0, Lcom/android/volley/misc/ByteArrayPool;

    sget v1, Lcom/changba/utils/NetworkEncrypt;->f:I

    invoke-direct {v0, v1}, Lcom/android/volley/misc/ByteArrayPool;-><init>(I)V

    iput-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    return-void
.end method

.method public static declared-synchronized a()Lcom/changba/utils/NetworkEncrypt;
    .registers 2

    const-class v0, Lcom/changba/utils/NetworkEncrypt;

    monitor-enter v0

    .line 54
    :try_start_3
    sget-object v1, Lcom/changba/utils/NetworkEncrypt;->b:Lcom/changba/utils/NetworkEncrypt;

    if-nez v1, :cond_e

    .line 55
    new-instance v1, Lcom/changba/utils/NetworkEncrypt;

    invoke-direct {v1}, Lcom/changba/utils/NetworkEncrypt;-><init>()V

    sput-object v1, Lcom/changba/utils/NetworkEncrypt;->b:Lcom/changba/utils/NetworkEncrypt;

    .line 57
    :cond_e
    sget-object v1, Lcom/changba/utils/NetworkEncrypt;->b:Lcom/changba/utils/NetworkEncrypt;
    :try_end_10
    .catchall {:try_start_3 .. :try_end_10} :catchall_12

    monitor-exit v0

    return-object v1

    :catchall_12
    move-exception v1

    .line 53
    monitor-exit v0

    throw v1
.end method

.method private a(Ljava/security/interfaces/RSAPublicKey;[B)[B
    .registers 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    const-string v0, "RSA/ECB/PKCS1Padding"

    .line 78
    invoke-static {v0}, Ljavax/crypto/Cipher;->getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;

    move-result-object v0

    const/4 v1, 0x1

    .line 79
    invoke-virtual {v0, v1, p1}, Ljavax/crypto/Cipher;->init(ILjava/security/Key;)V

    .line 80
    invoke-virtual {v0, p2}, Ljavax/crypto/Cipher;->doFinal([B)[B

    move-result-object p1

    return-object p1
.end method

.method private b([B)V
    .registers 3

    .line 61
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->c:Ljava/util/Random;

    invoke-virtual {v0, p1}, Ljava/util/Random;->nextBytes([B)V

    return-void
.end method

.method private c()Ljava/lang/String;
    .registers 5

    const-string v0, "MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALbr6abInZtlggBiXmgwl5fEUe3KHY9sZj4bomDh+Jn9IC2CXnLaHYxBzmyoakIMWlJn43cP5bSsqZMTKmKDj/WJ125yR068L7uvm9YSQBi07hxeW***************"

    .line 100
    sget-object v1, Lcom/changba/context/KTVApplication;->mServerConfig:Lcom/changba/framework/api/model/config/ServerConfig;

    invoke-virtual {v1}, Lcom/changba/framework/api/model/config/ServerConfig;->getRsaKey()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_2c

    .line 101
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_11

    goto :goto_2c

    .line 103
    :cond_11
    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    const-string v3, "-1"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1f

    const/4 v0, 0x0

    goto :goto_2e

    .line 106
    :cond_1f
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v2

    const/16 v3, 0xa

    if-le v2, v3, :cond_2e

    .line 107
    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    goto :goto_2e

    :cond_2c
    :goto_2c
    const-string v0, "MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALbr6abInZtlggBiXmgwl5fEUe3KHY9sZj4bomDh+Jn9IC2CXnLaHYxBzmyoakIMWlJn43cP5bSsqZMTKmKDj/WJ125yR068L7uvm9YSQBi07hxeW+****************"

    :cond_2e
    :goto_2e
    return-object v0
.end method

.method public static c(Ljava/lang/String;)V
    .registers 4

    .line 221
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    if-nez p0, :cond_9

    const-string p0, ""

    :cond_9
    const/4 v1, 0x0

    const/16 v2, 0x64

    .line 226
    :try_start_c
    invoke-virtual {p0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_10} :catch_11

    move-object p0, v1

    :catch_11
    const-string v1, "key_faild_url"

    .line 229
    invoke-interface {v0, v1, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 230
    invoke-static {}, Lcom/changba/context/KTVApplication;->getApplicationContext()Landroid/content/Context;

    move-result-object p0

    const-string v1, "zlib_decode_faild"

    invoke-static {p0, v1, v0}, Lcom/changba/library/commonUtils/stats/DataStats;->a(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V

    return-void
.end method

.method private c([B)V
    .registers 3

    .line 65
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->c:Ljava/util/Random;

    invoke-virtual {v0, p1}, Ljava/util/Random;->nextBytes([B)V

    return-void
.end method

.method private d([B)Ljava/lang/String;
    .registers 4

    const/16 v0, 0x8

    .line 87
    :try_start_2
    invoke-static {p1, v0}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;

    move-result-object v0
    :try_end_6
    .catch Ljava/lang/NoClassDefFoundError; {:try_start_2 .. :try_end_6} :catch_7

    goto :goto_23

    .line 89
    :catch_7
    invoke-static {p1}, Lcom/changba/utils/Base64;->a([B)Ljava/lang/String;

    move-result-object p1

    const-string v0, "\\+"

    const-string v1, "-"

    .line 90
    invoke-virtual {p1, v0, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "/"

    const-string v1, "_"

    invoke-virtual {p1, v0, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "="

    const-string v1, ""

    invoke-virtual {p1, v0, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 92
    :goto_23
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-nez p1, :cond_31

    const-string p1, "\n"

    const-string v1, ""

    .line 93
    invoke-virtual {v0, p1, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :cond_31
    return-object v0
.end method

.method private d(Ljava/lang/String;)Ljava/security/interfaces/RSAPublicKey;
    .registers 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 69
    invoke-static {p1}, Lcom/changba/utils/Base64;->a(Ljava/lang/String;)[B

    move-result-object p1

    const-string v0, "RSA"

    .line 70
    invoke-static {v0}, Ljava/security/KeyFactory;->getInstance(Ljava/lang/String;)Ljava/security/KeyFactory;

    move-result-object v0

    .line 71
    new-instance v1, Ljava/security/spec/X509EncodedKeySpec;

    invoke-direct {v1, p1}, Ljava/security/spec/X509EncodedKeySpec;-><init>([B)V

    .line 73
    invoke-virtual {v0, v1}, Ljava/security/KeyFactory;->generatePublic(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;

    move-result-object p1

    check-cast p1, Ljava/security/interfaces/RSAPublicKey;

    return-object p1
.end method


# virtual methods
.method public a(Ljava/lang/String;)Ljava/lang/String;
    .registers 9

    .line 124
    invoke-direct {p0}, Lcom/changba/utils/NetworkEncrypt;->c()Ljava/lang/String;

    move-result-object v0

    .line 125
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_c5

    const/4 v1, 0x0

    .line 127
    :try_start_b
    iget-object v2, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    const/16 v3, 0x10

    invoke-virtual {v2, v3}, Lcom/android/volley/misc/ByteArrayPool;->a(I)[B

    move-result-object v2
    :try_end_13
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_13} :catch_98
    .catchall {:try_start_b .. :try_end_13} :catchall_94

    .line 128
    :try_start_13
    invoke-direct {p0, v2}, Lcom/changba/utils/NetworkEncrypt;->b([B)V

    .line 130
    iget-object v4, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v4, v3}, Lcom/android/volley/misc/ByteArrayPool;->a(I)[B

    move-result-object v3
    :try_end_1c
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_1c} :catch_90
    .catchall {:try_start_13 .. :try_end_1c} :catchall_8d

    .line 131
    :try_start_1c
    invoke-direct {p0, v3}, Lcom/changba/utils/NetworkEncrypt;->c([B)V

    .line 133
    new-instance v1, Ljavax/crypto/spec/IvParameterSpec;

    invoke-direct {v1, v3}, Ljavax/crypto/spec/IvParameterSpec;-><init>([B)V

    .line 134
    new-instance v4, Ljavax/crypto/spec/SecretKeySpec;

    const-string v5, "AES"

    invoke-direct {v4, v2, v5}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V

    const-string v5, "AES/CBC/PKCS5Padding"

    .line 135
    invoke-static {v5}, Ljavax/crypto/Cipher;->getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;

    move-result-object v5

    const/4 v6, 0x1

    .line 136
    invoke-virtual {v5, v6, v4, v1}, Ljavax/crypto/Cipher;->init(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V

    .line 138
    invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B

    move-result-object p1

    invoke-virtual {v5, p1}, Ljavax/crypto/Cipher;->doFinal([B)[B

    move-result-object p1

    .line 139
    invoke-direct {p0, p1}, Lcom/changba/utils/NetworkEncrypt;->d([B)Ljava/lang/String;

    move-result-object p1

    .line 141
    array-length v1, v2

    array-length v4, v3

    add-int/2addr v1, v4

    new-array v1, v1, [B

    .line 142
    array-length v4, v2

    const/4 v5, 0x0

    invoke-static {v2, v5, v1, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 143
    array-length v4, v2

    array-length v6, v3

    invoke-static {v3, v5, v1, v4, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 145
    invoke-direct {p0, v0}, Lcom/changba/utils/NetworkEncrypt;->d(Ljava/lang/String;)Ljava/security/interfaces/RSAPublicKey;

    move-result-object v0

    .line 146
    invoke-direct {p0, v0, v1}, Lcom/changba/utils/NetworkEncrypt;->a(Ljava/security/interfaces/RSAPublicKey;[B)[B

    move-result-object v0

    .line 147
    invoke-direct {p0, v0}, Lcom/changba/utils/NetworkEncrypt;->d([B)Ljava/lang/String;

    move-result-object v0

    .line 149
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "kk="

    .line 150
    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "&"

    .line 151
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "rr="

    .line 152
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 154
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1
    :try_end_7a
    .catch Ljava/lang/Exception; {:try_start_1c .. :try_end_7a} :catch_8b
    .catchall {:try_start_1c .. :try_end_7a} :catchall_89

    if-eqz v2, :cond_81

    .line 161
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v2}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_81
    if-eqz v3, :cond_88

    .line 164
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v3}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_88
    return-object p1

    :catchall_89
    move-exception p1

    goto :goto_b6

    :catch_8b
    move-exception p1

    goto :goto_92

    :catchall_8d
    move-exception p1

    move-object v3, v1

    goto :goto_b6

    :catch_90
    move-exception p1

    move-object v3, v1

    :goto_92
    move-object v1, v2

    goto :goto_9a

    :catchall_94
    move-exception p1

    move-object v2, v1

    move-object v3, v2

    goto :goto_b6

    :catch_98
    move-exception p1

    move-object v3, v1

    :goto_9a
    :try_start_9a
    const-string v0, "URLParamsEncrypt"

    .line 157
    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-static {v0, p1}, Lcom/changba/library/commonUtils/KTVLog;->b(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, ""
    :try_end_a5
    .catchall {:try_start_9a .. :try_end_a5} :catchall_b4

    if-eqz v1, :cond_ac

    .line 161
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v1}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_ac
    if-eqz v3, :cond_b3

    .line 164
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v3}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_b3
    return-object p1

    :catchall_b4
    move-exception p1

    move-object v2, v1

    :goto_b6
    if-eqz v2, :cond_bd

    .line 161
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v2}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_bd
    if-eqz v3, :cond_c4

    .line 164
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->g:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, v3}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V

    :cond_c4
    throw p1

    :cond_c5
    const-string p1, ""

    return-object p1
.end method

.method public a([B)[B
    .registers 8

    const/4 v0, 0x0

    .line 184
    :try_start_1
    new-instance v1, Ljava/util/zip/Inflater;

    invoke-direct {v1}, Ljava/util/zip/Inflater;-><init>()V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_6} :catch_7a
    .catchall {:try_start_1 .. :try_end_6} :catchall_5b

    .line 185
    :try_start_6
    invoke-virtual {v1}, Ljava/util/zip/Inflater;->reset()V

    .line 186
    invoke-virtual {v1, p1}, Ljava/util/zip/Inflater;->setInput([B)V

    .line 187
    new-instance v2, Lcom/android/volley/misc/PoolingByteArrayOutputStream;

    iget-object v3, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    array-length p1, p1

    invoke-direct {v2, v3, p1}, Lcom/android/volley/misc/PoolingByteArrayOutputStream;-><init>(Lcom/android/volley/misc/ByteArrayPool;I)V
    :try_end_14
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_14} :catch_58
    .catchall {:try_start_6 .. :try_end_14} :catchall_55

    .line 188
    :try_start_14
    iget-object p1, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    const/16 v3, 0x400

    invoke-virtual {p1, v3}, Lcom/android/volley/misc/ByteArrayPool;->a(I)[B

    move-result-object p1
    :try_end_1c
    .catch Ljava/lang/Exception; {:try_start_14 .. :try_end_1c} :catch_53
    .catchall {:try_start_14 .. :try_end_1c} :catchall_51

    .line 189
    :goto_1c
    :try_start_1c
    invoke-virtual {v1}, Ljava/util/zip/Inflater;->finished()Z

    move-result v3

    if-nez v3, :cond_2b

    .line 190
    invoke-virtual {v1, p1}, Ljava/util/zip/Inflater;->inflate([B)I

    move-result v3

    const/4 v4, 0x0

    .line 191
    invoke-virtual {v2, p1, v4, v3}, Ljava/io/ByteArrayOutputStream;->write([BII)V

    goto :goto_1c

    .line 193
    :cond_2b
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v3
    :try_end_2f
    .catch Ljava/lang/Exception; {:try_start_1c .. :try_end_2f} :catch_7d
    .catchall {:try_start_1c .. :try_end_2f} :catchall_4c

    if-eqz p1, :cond_36

    .line 198
    :try_start_31
    iget-object v0, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v0, p1}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V
    :try_end_36
    .catch Ljava/lang/Exception; {:try_start_31 .. :try_end_36} :catch_36

    :catch_36
    :cond_36
    if-eqz v2, :cond_40

    .line 204
    :try_start_38
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_3c

    goto :goto_40

    :catch_3c
    move-exception p1

    .line 206
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_40
    :goto_40
    if-eqz v1, :cond_4a

    .line 211
    :try_start_42
    invoke-virtual {v1}, Ljava/util/zip/Inflater;->end()V
    :try_end_45
    .catch Ljava/lang/Exception; {:try_start_42 .. :try_end_45} :catch_46

    goto :goto_4a

    :catch_46
    move-exception p1

    .line 213
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_4a
    :goto_4a
    move-object v0, v3

    goto :goto_98

    :catchall_4c
    move-exception v0

    move-object v5, v0

    move-object v0, p1

    move-object p1, v5

    goto :goto_5e

    :catchall_51
    move-exception p1

    goto :goto_5e

    :catch_53
    move-object p1, v0

    goto :goto_7d

    :catchall_55
    move-exception p1

    move-object v2, v0

    goto :goto_5e

    :catch_58
    move-object p1, v0

    move-object v2, p1

    goto :goto_7d

    :catchall_5b
    move-exception p1

    move-object v1, v0

    move-object v2, v1

    :goto_5e
    if-eqz v0, :cond_65

    .line 198
    :try_start_60
    iget-object v3, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v3, v0}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V
    :try_end_65
    .catch Ljava/lang/Exception; {:try_start_60 .. :try_end_65} :catch_65

    :catch_65
    :cond_65
    if-eqz v2, :cond_6f

    .line 204
    :try_start_67
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_6a
    .catch Ljava/io/IOException; {:try_start_67 .. :try_end_6a} :catch_6b

    goto :goto_6f

    :catch_6b
    move-exception v0

    .line 206
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_6f
    :goto_6f
    if-eqz v1, :cond_79

    .line 211
    :try_start_71
    invoke-virtual {v1}, Ljava/util/zip/Inflater;->end()V
    :try_end_74
    .catch Ljava/lang/Exception; {:try_start_71 .. :try_end_74} :catch_75

    goto :goto_79

    :catch_75
    move-exception v0

    .line 213
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 214
    :cond_79
    :goto_79
    throw p1

    :catch_7a
    move-object p1, v0

    move-object v1, p1

    move-object v2, v1

    :catch_7d
    :goto_7d
    if-eqz p1, :cond_84

    .line 198
    :try_start_7f
    iget-object v3, p0, Lcom/changba/utils/NetworkEncrypt;->e:Lcom/android/volley/misc/ByteArrayPool;

    invoke-virtual {v3, p1}, Lcom/android/volley/misc/ByteArrayPool;->a([B)V
    :try_end_84
    .catch Ljava/lang/Exception; {:try_start_7f .. :try_end_84} :catch_84

    :catch_84
    :cond_84
    if-eqz v2, :cond_8e

    .line 204
    :try_start_86
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_89
    .catch Ljava/io/IOException; {:try_start_86 .. :try_end_89} :catch_8a

    goto :goto_8e

    :catch_8a
    move-exception p1

    .line 206
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_8e
    :goto_8e
    if-eqz v1, :cond_98

    .line 211
    :try_start_90
    invoke-virtual {v1}, Ljava/util/zip/Inflater;->end()V
    :try_end_93
    .catch Ljava/lang/Exception; {:try_start_90 .. :try_end_93} :catch_94

    goto :goto_98

    :catch_94
    move-exception p1

    .line 213
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_98
    :goto_98
    return-object v0
.end method

.method public b()J
    .registers 3

    .line 114
    sget-wide v0, Lcom/changba/utils/NetworkEncrypt;->a:J

    return-wide v0
.end method

.method public b(Ljava/lang/String;)Z
    .registers 3

    if-eqz p1, :cond_10

    const-string v0, "zlib"

    .line 172
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_10

    const/4 p1, 0x1

    return p1

    :cond_10
    const/4 p1, 0x0

    return p1
.end method
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值