Encrypter.smali
.class public Lcom/iflytek/cloud/msc/util/Encrypter;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final BUFFER_SIZE:I = 0x400
.field public static final GZIP_KEY:B = 0x5t
.field private static final RSA_PUBLIC_KEY:Ljava/lang/String; = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCt8H0BF3SquJmk6xIo2bTldgvtazLIeSbR4cle\np7zeUAtI/mC7UgFl8xXFCTemVambyQFnM5GsZOI1BpAMJO7N/YHRX7hvCZG6D0rEXQEdKXhKFIBQ\nmOYRYZP042vWRcKZ6iQLdLYmyg6tIzjYVfH0f6YX8OLIU7fy0TA/c88rzwIDAQAB"
.field private static final SDK_VERSION_KITKAT:I = 0x13
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 19
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static declared-synchronized MD5(Ljava/lang/String;)Ljava/lang/String;
.registers 8
.prologue
const/4 v0, 0x0
.line 170
const-class v2, Lcom/iflytek/cloud/msc/util/Encrypter;
monitor-enter v2
.line 173
:try_start_4
const-string v1, "MD5"
invoke-static {v1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v3
.line 175
invoke-virtual {p0}, Ljava/lang/String;->toCharArray()[C
move-result-object v4
.line 176
array-length v1, v4
new-array v5, v1, [B
move v1, v0
.line 178
:goto_12
array-length v6, v4
if-ge v1, v6, :cond_1d
.line 180
aget-char v6, v4, v1
int-to-byte v6, v6
aput-byte v6, v5, v1
.line 178
add-int/lit8 v1, v1, 0x1
goto :goto_12
.line 182
:cond_1d
invoke-virtual {v3, v5}, Ljava/security/MessageDigest;->digest([B)[B
move-result-object v1
.line 184
new-instance v3, Ljava/lang/StringBuffer;
invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V
.line 185
:goto_26
array-length v4, v1
if-ge v0, v4, :cond_40
.line 187
aget-byte v4, v1, v0
and-int/lit16 v4, v4, 0xff
.line 188
const/16 v5, 0x10
if-ge v4, v5, :cond_36
.line 190
const-string v5, "0"
invoke-virtual {v3, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
.line 192
:cond_36
invoke-static {v4}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
.line 185
add-int/lit8 v0, v0, 0x1
goto :goto_26
.line 194
:cond_40
invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
:try_end_43
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_43} :catch_46
.catchall {:try_start_4 .. :try_end_43} :catchall_4d
move-result-object v0
.line 198
:goto_44
monitor-exit v2
return-object v0
.line 195
:catch_46
move-exception v0
.line 197
:try_start_47
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
.line 198
const-string v0, ""
:try_end_4c
.catchall {:try_start_47 .. :try_end_4c} :catchall_4d
goto :goto_44
.line 170
:catchall_4d
move-exception v0
monitor-exit v2
throw v0
.end method
.method public static byteArrayToInt([B)I
.registers 5
.prologue
const/4 v0, 0x0
.line 352
move v1, v0
.line 354
:goto_2
const/4 v2, 0x4
if-ge v0, v2, :cond_13
.line 355
rsub-int/lit8 v2, v0, 0x3
mul-int/lit8 v2, v2, 0x8
.line 356
aget-byte v3, p0, v0
and-int/lit16 v3, v3, 0xff
shl-int v2, v3, v2
add-int/2addr v1, v2
.line 354
add-int/lit8 v0, v0, 0x1
goto :goto_2
.line 358
:cond_13
return v1
.end method
.method public static declared-synchronized cut16MD5(Ljava/lang/String;)Ljava/lang/String;
.registers 8
.prologue
const/4 v0, 0x0
.line 204
const-class v2, Lcom/iflytek/cloud/msc/util/Encrypter;
monitor-enter v2
:try_start_4
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "cut16MD5 start:"
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 205
invoke-static {p0}, Lcom/iflytek/cloud/msc/util/Encrypter;->MD5(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
.line 206
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "cut16MD5 start:"
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 207
new-instance v4, Ljava/lang/StringBuffer;
invoke-direct {v4}, Ljava/lang/StringBuffer;-><init>()V
.line 208
if-eqz v3, :cond_41
invoke-virtual {v3}, Ljava/lang/String;->length()I
:try_end_3e
.catchall {:try_start_4 .. :try_end_3e} :catchall_bf
move-result v1
if-nez v1, :cond_43
.line 221
:cond_41
:goto_41
monitor-exit v2
return-object v0
.line 211
:cond_43
:try_start_43
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "cut16MD5 md5 size is:"
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v3}, Ljava/lang/String;->length()I
move-result v5
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 212
const/4 v1, 0x0
:goto_5e
invoke-virtual {v3}, Ljava/lang/String;->length()I
move-result v5
if-ge v1, v5, :cond_a2
.line 213
rem-int/lit8 v5, v1, 0x2
if-nez v5, :cond_89
.line 214
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "cut16MD5 result i:"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v3, v1}, Ljava/lang/String;->charAt(I)C
move-result v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 215
invoke-virtual {v3, v1}, Ljava/lang/String;->charAt(I)C
move-result v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 218
:cond_89
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "cut16MD5 result i = :"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 212
add-int/lit8 v1, v1, 0x1
goto :goto_5e
.line 220
:cond_a2
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "cut16MD5 result:"
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 221
if-eqz v4, :cond_41
invoke-virtual {v4}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
:try_end_bd
.catchall {:try_start_43 .. :try_end_bd} :catchall_bf
move-result-object v0
goto :goto_41
.line 204
:catchall_bf
move-exception v0
monitor-exit v2
throw v0
.end method
.method public static encrypt([B)[B
.registers 11
.prologue
const/4 v1, 0x0
.line 292
:try_start_1
invoke-static {}, Lcom/iflytek/cloud/msc/util/AESUtil;->generateKey()Ljavax/crypto/spec/SecretKeySpec;
move-result-object v0
invoke-virtual {v0}, Ljavax/crypto/spec/SecretKeySpec;->getEncoded()[B
move-result-object v3
.line 295
if-eqz p0, :cond_59
.line 296
invoke-static {p0}, Lcom/iflytek/cloud/msc/util/Encrypter;->zip([B)[B
move-result-object v0
invoke-static {v0, v3}, Lcom/iflytek/cloud/msc/util/AESUtil;->encrypt([B[B)[B
move-result-object v0
move-object v2, v0
.line 299
:goto_14
const-string v0, "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCt8H0BF3SquJmk6xIo2bTldgvtazLIeSbR4cle\np7zeUAtI/mC7UgFl8xXFCTemVambyQFnM5GsZOI1BpAMJO7N/YHRX7hvCZG6D0rEXQEdKXhKFIBQ\nmOYRYZP042vWRcKZ6iQLdLYmyg6tIzjYVfH0f6YX8OLIU7fy0TA/c88rzwIDAQAB"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/RSAUtil;->loadPublicKey(Ljava/lang/String;)Ljava/security/interfaces/RSAPublicKey;
move-result-object v0
.line 300
invoke-static {v3, v0}, Lcom/iflytek/cloud/msc/util/RSAUtil;->encryptByPublicKey([BLjava/security/interfaces/RSAPublicKey;)[B
move-result-object v3
.line 303
if-eqz v3, :cond_22
if-nez v2, :cond_24
:cond_22
move-object v0, v1
.line 338
:goto_23
return-object v0
.line 307
:cond_24
array-length v4, v3
.line 308
array-length v5, v2
.line 311
add-int v0, v4, v5
add-int/lit8 v0, v0, 0xa
new-array v0, v0, [B
.line 314
const/4 v6, 0x0
const/4 v7, 0x1
aput-byte v7, v0, v6
.line 316
const/4 v6, 0x1
.line 318
invoke-static {v4}, Lcom/iflytek/cloud/msc/util/Encrypter;->intToByteArray(I)[B
move-result-object v7
const/4 v8, 0x0
const/4 v9, 0x4
invoke-static {v7, v8, v0, v6, v9}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 319
const/4 v6, 0x5
.line 321
const/4 v7, 0x0
invoke-static {v3, v7, v0, v6, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 322
add-int/lit8 v3, v4, 0x5
.line 325
const/4 v4, 0x3
aput-byte v4, v0, v3
.line 326
add-int/lit8 v3, v3, 0x1
.line 328
invoke-static {v5}, Lcom/iflytek/cloud/msc/util/Encrypter;->intToByteArray(I)[B
move-result-object v4
const/4 v6, 0x0
const/4 v7, 0x4
invoke-static {v4, v6, v0, v3, v7}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 329
add-int/lit8 v3, v3, 0x4
.line 331
const/4 v4, 0x0
invoke-static {v2, v4, v0, v3, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
:try_end_55
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_55} :catch_56
goto :goto_23
.line 335
:catch_56
move-exception v0
move-object v0, v1
.line 338
goto :goto_23
:cond_59
move-object v2, v1
goto :goto_14
.end method
.method public static getFileMd5(Ljava/io/File;)Ljava/lang/String;
.registers 9
.prologue
const/4 v6, 0x0
.line 230
.line 231
invoke-virtual {p0}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_8
.line 255
:goto_7
return-object v6
.line 237
:cond_8
:try_start_8
new-instance v7, Ljava/io/FileInputStream;
invoke-direct {v7, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_d
.catch Ljava/lang/Exception; {:try_start_8 .. :try_end_d} :catch_42
.catchall {:try_start_8 .. :try_end_d} :catchall_54
.line 238
:try_start_d
invoke-virtual {v7}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object v0
sget-object v1, Ljava/nio/channels/FileChannel$MapMode;->READ_ONLY:Ljava/nio/channels/FileChannel$MapMode;
const-wide/16 v2, 0x0
.line 239
invoke-virtual {p0}, Ljava/io/File;->length()J
move-result-wide v4
.line 238
invoke-virtual/range {v0 .. v5}, Ljava/nio/channels/FileChannel;->map(Ljava/nio/channels/FileChannel$MapMode;JJ)Ljava/nio/MappedByteBuffer;
move-result-object v0
.line 240
const-string v1, "MD5"
invoke-static {v1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v1
.line 241
invoke-virtual {v1, v0}, Ljava/security/MessageDigest;->update(Ljava/nio/ByteBuffer;)V
.line 242
new-instance v0, Ljava/math/BigInteger;
const/4 v2, 0x1
invoke-virtual {v1}, Ljava/security/MessageDigest;->digest()[B
move-result-object v1
invoke-direct {v0, v2, v1}, Ljava/math/BigInteger;-><init>(I[B)V
.line 243
const/16 v1, 0x10
invoke-virtual {v0, v1}, Ljava/math/BigInteger;->toString(I)Ljava/lang/String;
:try_end_35
.catch Ljava/lang/Exception; {:try_start_d .. :try_end_35} :catch_66
.catchall {:try_start_d .. :try_end_35} :catchall_61
move-result-object v0
.line 247
if-eqz v7, :cond_3b
.line 249
:try_start_38
invoke-virtual {v7}, Ljava/io/FileInputStream;->close()V
:try_end_3b
.catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_3d
:cond_3b
:goto_3b
move-object v6, v0
.line 255
goto :goto_7
.line 250
:catch_3d
move-exception v1
.line 251
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
goto :goto_3b
.line 244
:catch_42
move-exception v0
move-object v1, v6
.line 245
:goto_44
:try_start_44
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
:try_end_47
.catchall {:try_start_44 .. :try_end_47} :catchall_63
.line 247
if-eqz v1, :cond_69
.line 249
:try_start_49
invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
:try_end_4c
.catch Ljava/io/IOException; {:try_start_49 .. :try_end_4c} :catch_4e
move-object v0, v6
.line 252
goto :goto_3b
.line 250
:catch_4e
move-exception v0
.line 251
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
move-object v0, v6
.line 252
goto :goto_3b
.line 247
:catchall_54
move-exception v0
move-object v7, v6
:goto_56
if-eqz v7, :cond_5b
.line 249
:try_start_58
invoke-virtual {v7}, Ljava/io/FileInputStream;->close()V
:try_end_5b
.catch Ljava/io/IOException; {:try_start_58 .. :try_end_5b} :catch_5c
.line 254
:cond_5b
:goto_5b
throw v0
.line 250
:catch_5c
move-exception v1
.line 251
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
goto :goto_5b
.line 247
:catchall_61
move-exception v0
goto :goto_56
:catchall_63
move-exception v0
move-object v7, v1
goto :goto_56
.line 244
:catch_66
move-exception v0
move-object v1, v7
goto :goto_44
:cond_69
move-object v0, v6
goto :goto_3b
.end method
.method public static intToByteArray(I)[B
.registers 4
.prologue
.line 342
const/4 v0, 0x4
new-array v0, v0, [B
.line 344
const/4 v1, 0x0
shr-int/lit8 v2, p0, 0x18
and-int/lit16 v2, v2, 0xff
int-to-byte v2, v2
aput-byte v2, v0, v1
.line 345
const/4 v1, 0x1
shr-int/lit8 v2, p0, 0x10
and-int/lit16 v2, v2, 0xff
int-to-byte v2, v2
aput-byte v2, v0, v1
.line 346
const/4 v1, 0x2
shr-int/lit8 v2, p0, 0x8
and-int/lit16 v2, v2, 0xff
int-to-byte v2, v2
aput-byte v2, v0, v1
.line 347
const/4 v1, 0x3
and-int/lit16 v2, p0, 0xff
int-to-byte v2, v2
aput-byte v2, v0, v1
.line 348
return-object v0
.end method
.method public static lightcode([B)[B
.registers 3
.prologue
.line 31
if-nez p0, :cond_4
.line 32
const/4 p0, 0x0
.line 37
:cond_3
return-object p0
.line 33
:cond_4
const/4 v0, 0x0
:goto_5
array-length v1, p0
if-ge v0, v1, :cond_3
.line 35
aget-byte v1, p0, v0
xor-int/lit8 v1, v1, 0x5
int-to-byte v1, v1
aput-byte v1, p0, v0
.line 33
add-int/lit8 v0, v0, 0x1
goto :goto_5
.end method
.method private static zip([B)[B
.registers 6
.prologue
const/4 v0, 0x0
.line 259
if-nez p0, :cond_4
.line 286
:goto_3
return-object v0
.line 263
:cond_4
new-instance v3, Ljava/io/ByteArrayOutputStream;
invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 266
:try_start_9
new-instance v2, Ljava/util/zip/GZIPOutputStream;
invoke-direct {v2, v3}, Ljava/util/zip/GZIPOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_e
.catch Ljava/io/IOException; {:try_start_9 .. :try_end_e} :catch_2f
.catchall {:try_start_9 .. :try_end_e} :catchall_42
.line 267
:try_start_e
invoke-virtual {v2, p0}, Ljava/util/zip/GZIPOutputStream;->write([B)V
.line 268
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->finish()V
.line 269
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v4, 0x13
if-ge v1, v4, :cond_1d
.line 270
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->flush()V
.line 272
:cond_1d
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
:try_end_20
.catch Ljava/io/IOException; {:try_start_e .. :try_end_20} :catch_55
.catchall {:try_start_e .. :try_end_20} :catchall_53
move-result-object v0
.line 278
if-eqz v2, :cond_26
.line 279
:try_start_23
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 281
:cond_26
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_29
.catch Ljava/io/IOException; {:try_start_23 .. :try_end_29} :catch_2a
goto :goto_3
.line 282
:catch_2a
move-exception v1
.line 283
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
goto :goto_3
.line 274
:catch_2f
move-exception v1
move-object v2, v0
.line 275
:goto_31
:try_start_31
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
:try_end_34
.catchall {:try_start_31 .. :try_end_34} :catchall_53
.line 278
if-eqz v2, :cond_39
.line 279
:try_start_36
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 281
:cond_39
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_3c
.catch Ljava/io/IOException; {:try_start_36 .. :try_end_3c} :catch_3d
goto :goto_3
.line 282
:catch_3d
move-exception v1
.line 283
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
goto :goto_3
.line 277
:catchall_42
move-exception v1
move-object v2, v0
move-object v0, v1
.line 278
:goto_45
if-eqz v2, :cond_4a
.line 279
:try_start_47
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 281
:cond_4a
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_4d
.catch Ljava/io/IOException; {:try_start_47 .. :try_end_4d} :catch_4e
.line 285
:goto_4d
throw v0
.line 282
:catch_4e
move-exception v1
.line 283
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
goto :goto_4d
.line 277
:catchall_53
move-exception v0
goto :goto_45
.line 274
:catch_55
move-exception v1
goto :goto_31
.end method
.method public static zip5xDecode([B)[B
.registers 9
.prologue
const/4 v1, 0x0
const/4 v0, 0x0
.line 109
if-nez p0, :cond_6
move-object v0, v1
.line 161
:cond_5
:goto_5
return-object v0
.line 115
:cond_6
:goto_6
array-length v2, p0
if-ge v0, v2, :cond_13
.line 117
aget-byte v2, p0, v0
xor-int/lit8 v2, v2, 0x5
int-to-byte v2, v2
aput-byte v2, p0, v0
.line 115
add-int/lit8 v0, v0, 0x1
goto :goto_6
.line 120
:cond_13
new-instance v3, Ljava/io/ByteArrayInputStream;
invoke-direct {v3, p0}, Ljava/io/ByteArrayInputStream;-><init>([B)V
.line 122
new-instance v4, Ljava/io/ByteArrayOutputStream;
invoke-direct {v4}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 125
:try_start_1d
new-instance v2, Ljava/util/zip/GZIPInputStream;
invoke-direct {v2, v3}, Ljava/util/zip/GZIPInputStream;-><init>(Ljava/io/InputStream;)V
:try_end_22
.catch Ljava/io/IOException; {:try_start_1d .. :try_end_22} :catch_85
.catchall {:try_start_1d .. :try_end_22} :catchall_6c
.line 126
const/16 v0, 0x400
:try_start_24
new-array v0, v0, [B
.line 128
:goto_26
const/4 v5, 0x0
array-length v6, v0
invoke-virtual {v2, v0, v5, v6}, Ljava/util/zip/GZIPInputStream;->read([BII)I
move-result v5
const/4 v6, -0x1
if-eq v5, v6, :cond_50
.line 130
const/4 v6, 0x0
invoke-virtual {v4, v0, v6, v5}, Ljava/io/ByteArrayOutputStream;->write([BII)V
:try_end_33
.catch Ljava/io/IOException; {:try_start_24 .. :try_end_33} :catch_34
.catchall {:try_start_24 .. :try_end_33} :catchall_83
goto :goto_26
.line 135
:catch_34
move-exception v0
move-object v7, v0
move-object v0, v1
move-object v1, v7
.line 137
:goto_38
:try_start_38
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
:try_end_3b
.catchall {:try_start_38 .. :try_end_3b} :catchall_83
.line 143
if-eqz v2, :cond_40
.line 145
:try_start_3d
invoke-virtual {v2}, Ljava/util/zip/GZIPInputStream;->close()V
.line 147
:cond_40
if-eqz v3, :cond_45
.line 149
invoke-virtual {v3}, Ljava/io/ByteArrayInputStream;->close()V
.line 151
:cond_45
if-eqz v4, :cond_5
.line 153
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_4a
.catch Ljava/io/IOException; {:try_start_3d .. :try_end_4a} :catch_4b
goto :goto_5
.line 156
:catch_4b
move-exception v1
.line 158
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_5
.line 132
:cond_50
:try_start_50
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
:try_end_53
.catch Ljava/io/IOException; {:try_start_50 .. :try_end_53} :catch_34
.catchall {:try_start_50 .. :try_end_53} :catchall_83
move-result-object v0
.line 133
:try_start_54
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->flush()V
:try_end_57
.catch Ljava/io/IOException; {:try_start_54 .. :try_end_57} :catch_8b
.catchall {:try_start_54 .. :try_end_57} :catchall_83
.line 143
if-eqz v2, :cond_5c
.line 145
:try_start_59
invoke-virtual {v2}, Ljava/util/zip/GZIPInputStream;->close()V
.line 147
:cond_5c
if-eqz v3, :cond_61
.line 149
invoke-virtual {v3}, Ljava/io/ByteArrayInputStream;->close()V
.line 151
:cond_61
if-eqz v4, :cond_5
.line 153
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_66
.catch Ljava/io/IOException; {:try_start_59 .. :try_end_66} :catch_67
goto :goto_5
.line 156
:catch_67
move-exception v1
.line 158
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_5
.line 141
:catchall_6c
move-exception v0
move-object v2, v1
.line 143
:goto_6e
if-eqz v2, :cond_73
.line 145
:try_start_70
invoke-virtual {v2}, Ljava/util/zip/GZIPInputStream;->close()V
.line 147
:cond_73
if-eqz v3, :cond_78
.line 149
invoke-virtual {v3}, Ljava/io/ByteArrayInputStream;->close()V
.line 151
:cond_78
if-eqz v4, :cond_7d
.line 153
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_7d
.catch Ljava/io/IOException; {:try_start_70 .. :try_end_7d} :catch_7e
.line 160
:cond_7d
:goto_7d
throw v0
.line 156
:catch_7e
move-exception v1
.line 158
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_7d
.line 141
:catchall_83
move-exception v0
goto :goto_6e
.line 135
:catch_85
move-exception v0
move-object v2, v1
move-object v7, v0
move-object v0, v1
move-object v1, v7
goto :goto_38
:catch_8b
move-exception v1
goto :goto_38
.end method
.method public static zip5xEncode([B)[B
.registers 6
.prologue
const/4 v0, 0x0
.line 50
if-nez p0, :cond_4
.line 95
:cond_3
:goto_3
return-object v0
.line 53
:cond_4
new-instance v3, Ljava/io/ByteArrayOutputStream;
invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V
.line 57
:try_start_9
new-instance v2, Ljava/util/zip/GZIPOutputStream;
invoke-direct {v2, v3}, Ljava/util/zip/GZIPOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_e
.catch Ljava/io/IOException; {:try_start_9 .. :try_end_e} :catch_3f
.catchall {:try_start_9 .. :try_end_e} :catchall_54
.line 58
:try_start_e
invoke-virtual {v2, p0}, Ljava/util/zip/GZIPOutputStream;->write([B)V
.line 59
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->finish()V
.line 60
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v4, 0x13
if-ge v1, v4, :cond_1d
.line 61
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->flush()V
.line 65
:cond_1d
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object v0
.line 68
const/4 v1, 0x0
:goto_22
array-length v4, v0
if-ge v1, v4, :cond_2f
.line 70
aget-byte v4, v0, v1
xor-int/lit8 v4, v4, 0x5
int-to-byte v4, v4
aput-byte v4, v0, v1
:try_end_2c
.catch Ljava/io/IOException; {:try_start_e .. :try_end_2c} :catch_69
.catchall {:try_start_e .. :try_end_2c} :catchall_67
.line 68
add-int/lit8 v1, v1, 0x1
goto :goto_22
.line 81
:cond_2f
if-eqz v2, :cond_34
.line 83
:try_start_31
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 85
:cond_34
if-eqz v3, :cond_3
.line 87
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_39
.catch Ljava/io/IOException; {:try_start_31 .. :try_end_39} :catch_3a
goto :goto_3
.line 90
:catch_3a
move-exception v1
.line 92
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_3
.line 73
:catch_3f
move-exception v1
move-object v2, v0
.line 75
:goto_41
:try_start_41
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
:try_end_44
.catchall {:try_start_41 .. :try_end_44} :catchall_67
.line 81
if-eqz v2, :cond_49
.line 83
:try_start_46
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 85
:cond_49
if-eqz v3, :cond_3
.line 87
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_4e
.catch Ljava/io/IOException; {:try_start_46 .. :try_end_4e} :catch_4f
goto :goto_3
.line 90
:catch_4f
move-exception v1
.line 92
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_3
.line 79
:catchall_54
move-exception v1
move-object v2, v0
move-object v0, v1
.line 81
:goto_57
if-eqz v2, :cond_5c
.line 83
:try_start_59
invoke-virtual {v2}, Ljava/util/zip/GZIPOutputStream;->close()V
.line 85
:cond_5c
if-eqz v3, :cond_61
.line 87
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_61
.catch Ljava/io/IOException; {:try_start_59 .. :try_end_61} :catch_62
.line 94
:cond_61
:goto_61
throw v0
.line 90
:catch_62
move-exception v1
.line 92
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_61
.line 79
:catchall_67
move-exception v0
goto :goto_57
.line 73
:catch_69
move-exception v1
goto :goto_41
.end method