HDThresholdQAKeystore$QAInfo.smali

.class public Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;
.super Ljava/lang/Object;
.source "HDThresholdQAKeystore.java"

# interfaces
.implements Landroid/os/Parcelable;
.implements Lcom/cmcm/safewallet/utils/q;


# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator",
            "<",
            "Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field public WW:Ljava/lang/String;

.field public WX:[B


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

    .prologue
    .line 90
    new-instance v0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo$1;

    invoke-direct {v0}, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo$1;-><init>()V

    sput-object v0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    .line 43
    return-void
.end method

.method protected constructor <init>(Landroid/os/Parcel;)V
    .registers 3

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

    .line 86
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WW:Ljava/lang/String;

    .line 87
    invoke-virtual {p1}, Landroid/os/Parcel;->createByteArray()[B

    move-result-object v0

    iput-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WX:[B

    .line 88
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;[B)V
    .registers 3

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

    .line 46
    iput-object p1, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WW:Ljava/lang/String;

    .line 47
    iput-object p2, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WX:[B

    .line 48
    return-void
.end method


# virtual methods
.method public final a(Lorg/json/JSONObject;)Z
    .registers 4

    .prologue
    .line 53
    :try_start_0
    const-string v0, "question"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WW:Ljava/lang/String;

    .line 54
    sget-object v0, Lorg/bitcoinj/core/Utils;->HEX:Lcom/google/common/io/BaseEncoding;

    const-string v1, "answer"

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/google/common/io/BaseEncoding;->m(Ljava/lang/CharSequence;)[B

    move-result-object v0

    iput-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WX:[B
    :try_end_16
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_16} :catch_18

    .line 59
    const/4 v0, 0x1

    :goto_17
    return v0

    .line 56
    :catch_18
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 57
    const/4 v0, 0x0

    goto :goto_17
.end method

.method public describeContents()I
    .registers 2

    .prologue
    .line 76
    const/4 v0, 0x0

    return v0
.end method

.method public final toJSON()Lorg/json/JSONObject;
    .registers 5

    .prologue
    .line 64
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    .line 66
    :try_start_5
    const-string v0, "question"

    iget-object v2, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WW:Ljava/lang/String;

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 67
    const-string v0, "answer"

    sget-object v2, Lorg/bitcoinj/core/Utils;->HEX:Lcom/google/common/io/BaseEncoding;

    iget-object v3, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WX:[B

    invoke-virtual {v2, v3}, Lcom/google/common/io/BaseEncoding;->encode([B)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_19
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_19} :catch_1a

    .line 71
    :goto_19
    return-object v1

    .line 69
    :catch_1a
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_19
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .registers 4

    .prologue
    .line 81
    iget-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WW:Ljava/lang/String;

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    .line 82
    iget-object v0, p0, Lcom/cmcm/safewallet/data/keystore/HDThresholdQAKeystore$QAInfo;->WX:[B

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeByteArray([B)V

    .line 83
    return-void
.end method