l.smali
.class public Lcom/amap/api/services/a/l;
.super Ljava/lang/Object;
# direct methods
.method public static a(Ljava/lang/String;)Ljava/lang/String;
.registers 7
const/4 v0, 0x0
const/4 v1, 0x0
:try_start_2
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
:try_end_5
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_5} :catch_a1
.catchall {:try_start_2 .. :try_end_5} :catchall_8b
move-result v2
if-eqz v2, :cond_19
if-eqz v0, :cond_d
:try_start_a
invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
:try_end_d
.catch Ljava/io/IOException; {:try_start_a .. :try_end_d} :catch_e
:cond_d
:goto_d
return-object v0
:catch_e
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5FromFile"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_d
:cond_19
:try_start_19
new-instance v3, Ljava/io/File;
invoke-direct {v3, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/io/File;->isFile()Z
move-result v2
if-eqz v2, :cond_2a
invoke-virtual {v3}, Ljava/io/File;->exists()Z
:try_end_27
.catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_27} :catch_a1
.catchall {:try_start_19 .. :try_end_27} :catchall_8b
move-result v2
if-nez v2, :cond_3b
:cond_2a
if-eqz v0, :cond_d
:try_start_2c
invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
:try_end_2f
.catch Ljava/io/IOException; {:try_start_2c .. :try_end_2f} :catch_30
goto :goto_d
:catch_30
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5FromFile"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_d
:cond_3b
const/16 v1, 0x800
:try_start_3d
new-array v1, v1, [B
const-string/jumbo v2, "MD5"
invoke-static {v2}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v4
new-instance v2, Ljava/io/FileInputStream;
invoke-direct {v2, v3}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_4b
.catch Ljava/lang/Throwable; {:try_start_3d .. :try_end_4b} :catch_a1
.catchall {:try_start_3d .. :try_end_4b} :catchall_8b
:goto_4b
:try_start_4b
invoke-virtual {v2, v1}, Ljava/io/FileInputStream;->read([B)I
move-result v3
const/4 v5, -0x1
if-eq v3, v5, :cond_72
const/4 v5, 0x0
invoke-virtual {v4, v1, v5, v3}, Ljava/security/MessageDigest;->update([BII)V
:try_end_56
.catch Ljava/lang/Throwable; {:try_start_4b .. :try_end_56} :catch_57
.catchall {:try_start_4b .. :try_end_56} :catchall_9f
goto :goto_4b
:catch_57
move-exception v1
:goto_58
:try_start_58
const-string/jumbo v3, "MD5"
const-string/jumbo v4, "getMd5FromFile"
invoke-static {v1, v3, v4}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:try_end_61
.catchall {:try_start_58 .. :try_end_61} :catchall_9f
if-eqz v2, :cond_d
:try_start_63
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_66
.catch Ljava/io/IOException; {:try_start_63 .. :try_end_66} :catch_67
goto :goto_d
:catch_67
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5FromFile"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_d
:cond_72
:try_start_72
invoke-virtual {v4}, Ljava/security/MessageDigest;->digest()[B
move-result-object v1
invoke-static {v1}, Lcom/amap/api/services/a/o;->d([B)Ljava/lang/String;
:try_end_79
.catch Ljava/lang/Throwable; {:try_start_72 .. :try_end_79} :catch_57
.catchall {:try_start_72 .. :try_end_79} :catchall_9f
move-result-object v0
if-eqz v2, :cond_d
:try_start_7c
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_7f
.catch Ljava/io/IOException; {:try_start_7c .. :try_end_7f} :catch_80
goto :goto_d
:catch_80
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5FromFile"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_d
:catchall_8b
move-exception v1
move-object v2, v0
move-object v0, v1
:goto_8e
if-eqz v2, :cond_93
:try_start_90
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_93
.catch Ljava/io/IOException; {:try_start_90 .. :try_end_93} :catch_94
:cond_93
:goto_93
throw v0
:catch_94
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5FromFile"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_93
:catchall_9f
move-exception v0
goto :goto_8e
:catch_a1
move-exception v1
move-object v2, v0
goto :goto_58
.end method
.method public static a([B)Ljava/lang/String;
.registers 2
invoke-static {p0}, Lcom/amap/api/services/a/l;->b([B)[B
move-result-object v0
invoke-static {v0}, Lcom/amap/api/services/a/o;->d([B)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static a([BLjava/lang/String;)[B
.registers 6
const/4 v0, 0x0
:try_start_1
invoke-static {p1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/security/MessageDigest;->update([B)V
invoke-virtual {v1}, Ljava/security/MessageDigest;->digest()[B
:try_end_b
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_b} :catch_d
move-result-object v0
:goto_c
return-object v0
:catch_d
move-exception v1
const-string/jumbo v2, "MD5"
const-string/jumbo v3, "getMd5Bytes1"
invoke-static {v1, v2, v3}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_c
.end method
.method public static b(Ljava/lang/String;)Ljava/lang/String;
.registers 2
if-nez p0, :cond_4
const/4 v0, 0x0
:goto_3
return-object v0
:cond_4
invoke-static {p0}, Lcom/amap/api/services/a/l;->d(Ljava/lang/String;)[B
move-result-object v0
invoke-static {v0}, Lcom/amap/api/services/a/o;->d([B)Ljava/lang/String;
move-result-object v0
goto :goto_3
.end method
.method private static b([B)[B
.registers 2
const-string/jumbo v0, "MD5"
invoke-static {p0, v0}, Lcom/amap/api/services/a/l;->a([BLjava/lang/String;)[B
move-result-object v0
return-object v0
.end method
.method public static c(Ljava/lang/String;)Ljava/lang/String;
.registers 2
invoke-static {p0}, Lcom/amap/api/services/a/l;->e(Ljava/lang/String;)[B
move-result-object v0
invoke-static {v0}, Lcom/amap/api/services/a/o;->e([B)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static d(Ljava/lang/String;)[B
.registers 4
:try_start_0
invoke-static {p0}, Lcom/amap/api/services/a/l;->f(Ljava/lang/String;)[B
:try_end_3
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_3} :catch_5
move-result-object v0
:goto_4
return-object v0
:catch_5
move-exception v0
const-string/jumbo v1, "MD5"
const-string/jumbo v2, "getMd5Bytes"
invoke-static {v0, v1, v2}, Lcom/amap/api/services/a/q;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
const/4 v0, 0x0
new-array v0, v0, [B
goto :goto_4
.end method
.method private static e(Ljava/lang/String;)[B
.registers 2
:try_start_0
invoke-static {p0}, Lcom/amap/api/services/a/l;->f(Ljava/lang/String;)[B
:try_end_3
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_3} :catch_5
move-result-object v0
:goto_4
return-object v0
:catch_5
move-exception v0
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
const/4 v0, 0x0
new-array v0, v0, [B
goto :goto_4
.end method
.method private static f(Ljava/lang/String;)[B
.registers 3
if-nez p0, :cond_4
const/4 v0, 0x0
:goto_3
return-object v0
:cond_4
const-string/jumbo v0, "MD5"
invoke-static {v0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v0
invoke-static {p0}, Lcom/amap/api/services/a/o;->a(Ljava/lang/String;)[B
move-result-object v1
invoke-virtual {v0, v1}, Ljava/security/MessageDigest;->update([B)V
invoke-virtual {v0}, Ljava/security/MessageDigest;->digest()[B
move-result-object v0
goto :goto_3
.end method