m.smali
.class public final Lcom/subgraph/orchid/crypto/m;
.super Ljava/lang/Object;
.source "TorMessageDigest.java"
# instance fields
.field private final bGb:Ljava/security/MessageDigest;
# direct methods
.method public constructor <init>()V
.registers 2
.prologue
.line 32
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/subgraph/orchid/crypto/m;-><init>(Z)V
.line 33
return-void
.end method
.method public constructor <init>(Z)V
.registers 3
.prologue
.line 26
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 27
invoke-static {p1}, Lcom/subgraph/orchid/crypto/m;->bi(Z)Ljava/security/MessageDigest;
move-result-object v0
iput-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
.line 29
return-void
.end method
.method private static bi(Z)Ljava/security/MessageDigest;
.registers 3
.prologue
.line 37
if-eqz p0, :cond_9
:try_start_2
const-string v0, "SHA-256"
.line 38
:goto_4
invoke-static {v0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v0
return-object v0
.line 37
:cond_9
const-string v0, "SHA-1"
:try_end_b
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_2 .. :try_end_b} :catch_c
goto :goto_4
.line 39
:catch_c
move-exception v0
.line 40
new-instance v1, Lcom/subgraph/orchid/TorException;
invoke-direct {v1, v0}, Lcom/subgraph/orchid/TorException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
# virtual methods
.method public final Mb()[B
.registers 3
.prologue
.line 61
:try_start_0
iget-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
invoke-virtual {v0}, Ljava/security/MessageDigest;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/security/MessageDigest;
.line 62
invoke-virtual {v0}, Ljava/security/MessageDigest;->digest()[B
:try_end_b
.catch Ljava/lang/CloneNotSupportedException; {:try_start_0 .. :try_end_b} :catch_d
move-result-object v0
return-object v0
.line 63
:catch_d
move-exception v0
.line 64
new-instance v1, Lcom/subgraph/orchid/TorException;
invoke-direct {v1, v0}, Lcom/subgraph/orchid/TorException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public final al([B)[B
.registers 5
.prologue
.line 75
:try_start_0
iget-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
invoke-virtual {v0}, Ljava/security/MessageDigest;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/security/MessageDigest;
.line 76
const/4 v1, 0x3
const/16 v2, 0x1fd
invoke-virtual {v0, p1, v1, v2}, Ljava/security/MessageDigest;->update([BII)V
.line 77
invoke-virtual {v0}, Ljava/security/MessageDigest;->digest()[B
:try_end_11
.catch Ljava/lang/CloneNotSupportedException; {:try_start_0 .. :try_end_11} :catch_13
move-result-object v0
return-object v0
.line 78
:catch_13
move-exception v0
.line 79
new-instance v1, Lcom/subgraph/orchid/TorException;
invoke-direct {v1, v0}, Lcom/subgraph/orchid/TorException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public final am([B)V
.registers 5
.prologue
.line 111
iget-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
const/4 v1, 0x3
const/16 v2, 0x1fd
invoke-virtual {v0, p1, v1, v2}, Ljava/security/MessageDigest;->update([BII)V
.line 112
return-void
.end method
.method public final gJ(Ljava/lang/String;)V
.registers 4
.prologue
.line 122
:try_start_0
iget-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
const-string v1, "ISO-8859-1"
invoke-virtual {p1, v1}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v1
invoke-virtual {v0, v1}, Ljava/security/MessageDigest;->update([B)V
:try_end_b
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_b} :catch_c
.line 125
return-void
.line 123
:catch_c
move-exception v0
.line 124
new-instance v1, Lcom/subgraph/orchid/TorException;
invoke-direct {v1, v0}, Lcom/subgraph/orchid/TorException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public final update([B)V
.registers 3
.prologue
.line 99
iget-object v0, p0, Lcom/subgraph/orchid/crypto/m;->bGb:Ljava/security/MessageDigest;
invoke-virtual {v0, p1}, Ljava/security/MessageDigest;->update([B)V
.line 100
return-void
.end method