text: .class public Lcom/sina/weibo/sdk/utils/SecurityHelper;
  .super Ljava/lang/Object;
  
  
  # direct methods
  .method public constructor <init>()V
      .locals 0
  
      invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  
      return-void
  .end method
  
  .method public static checkResponseAppLegal(Landroid/content/Context;Lcom/sina/weibo/sdk/WeiboAppManager$WeiboInfo;Landroid/content/Intent;)Z
      .locals 3
  
      const/4 v0, 0x1
  
      if-eqz p1, :cond_1
  
      invoke-virtual {p1}, Lcom/sina/weibo/sdk/WeiboAppManager$WeiboInfo;->getSupportApi()I
  
      move-result v1
  
      const/16 v2, 0x2870
  
      if-gt v1, v2, :cond_1
  
      :cond_0
      :goto_0
      return v0
  
      :cond_1
      if-eqz p1, :cond_0
  
      if-eqz p2, :cond_3
  
      const-string v1, "_weibo_appPackage"
  
      invoke-virtual {p2, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
  
      move-result-object v1
  
      :goto_1
      if-eqz v1, :cond_2
  
      const-string v2, "_weibo_transaction"
  
      invoke-virtual {p2, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
  
      move-result-object v2
  
      if-eqz v2, :cond_2
  
      invoke-static {p0, v1}, Lcom/sina/weibo/sdk/ApiUtils;->validateWeiboSign(Landroid/content/Context;Ljava/lang/String;)Z
  
      move-result v1
  
      if-nez v1, :cond_0
  
      :cond_2
      const/4 v0, 0x0
  
      goto :goto_0
  
      :cond_3
      const/4 v1, 0x0
  
      goto :goto_1
  .end method
  
  .method public static containSign([Landroid/content/pm/Signature;Ljava/lang/String;)Z
      .locals 4
  
      const/4 v0, 0x0
  
      if-eqz p0, :cond_0
  
      if-nez p1, :cond_1
  
      :cond_0
      :goto_0
      return v0
  
      :cond_1
      array-length v2, p0
  
      move v1, v0
  
      :goto_1
      if-ge v1, v2, :cond_0
  
      aget-object v3, p0, v1
  
      invoke-virtual {v3}, Landroid/content/pm/Signature;->toByteArray()[B
  
      move-result-object v3
  
      invoke-static {v3}, Lcom/sina/weibo/sdk/utils/MD5;->hexdigest([B)Ljava/lang/String;
  
      move-result-object v3
  
      invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  
      move-result v3
  
      if-eqz v3, :cond_2
  
      const/4 v0, 0x1
  
      goto :goto_0
  
      :cond_2
      add-int/lit8 v1, v1, 0x1
  
      goto :goto_1
  .end method
  
  .method public static validateAppSignatureForIntent(Landroid/content/Context;Landroid/content/Intent;)Z
      .locals 4
  
      const/4 v0, 0x0
  
      invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
  
      move-result-object v1
  
      if-nez v1, :cond_1
  
      :cond_0
      :goto_0
      return v0
  
      :cond_1
      invoke-virtual {v1, p1, v0}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
  
      move-result-object v2
  
      if-eqz v2, :cond_0
  
      iget-object v2, v2, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
  
      iget-object v2, v2, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;
  
      const/16 v3, 0x40
  
      :try_start_0
      invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
  
      move-result-object v1
  
      iget-object v1, v1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
  
      const-string v2, "18da2bf10352443a00a5e046d9fca6bd"
  
      invoke-static {v1, v2}, Lcom/sina/weibo/sdk/utils/SecurityHelper;->containSign([Landroid/content/pm/Signature;Ljava/lang/String;)Z
      :try_end_0
      .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
      .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
  
      move-result v0
  
      goto :goto_0
  
      :catch_0
      move-exception v1
  
      invoke-virtual {v1}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V
  
      goto :goto_0
  
      :catch_1
      move-exception v1
  
      invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
  
      goto :goto_0
  .end method
  