package com.fa.c;

import android.text.TextUtils;
import android.util.Log;
import java.io.File;

public class MD5
{
  private static final String TAG = "MD5";
  
  /* Error */
  public static String calculateMD5(File paramFile)
  {
    // Byte code:
    //   0: ldc 8
    //   2: invokestatic 27	java/security/MessageDigest:getInstance	(Ljava/lang/String;)Ljava/security/MessageDigest;
    //   5: astore_2
    //   6: new 29	java/io/FileInputStream
    //   9: dup
    //   10: aload_0
    //   11: invokespecial 32	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   14: astore_0
    //   15: sipush 8192
    //   18: newarray <illegal type>
    //   20: astore_3
    //   21: aload_0
    //   22: aload_3
    //   23: invokevirtual 38	java/io/InputStream:read	([B)I
    //   26: istore_1
    //   27: iload_1
    //   28: ifgt +70 -> 98
    //   31: ldc 40
    //   33: iconst_1
    //   34: anewarray 4	java/lang/Object
    //   37: dup
    //   38: iconst_0
    //   39: new 42	java/math/BigInteger
    //   42: dup
    //   43: iconst_1
    //   44: aload_2
    //   45: invokevirtual 46	java/security/MessageDigest:digest	()[B
    //   48: invokespecial 49	java/math/BigInteger:<init>	(I[B)V
    //   51: bipush 16
    //   53: invokevirtual 53	java/math/BigInteger:toString	(I)Ljava/lang/String;
    //   56: aastore
    //   57: invokestatic 59	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   60: bipush 32
    //   62: bipush 48
    //   64: invokevirtual 63	java/lang/String:replace	(CC)Ljava/lang/String;
    //   67: astore_2
    //   68: aload_0
    //   69: invokevirtual 66	java/io/InputStream:close	()V
    //   72: aload_2
    //   73: areturn
    //   74: astore_0
    //   75: ldc 8
    //   77: ldc 68
    //   79: aload_0
    //   80: invokestatic 74	android/util/Log:e	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    //   83: pop
    //   84: aconst_null
    //   85: areturn
    //   86: astore_0
    //   87: ldc 8
    //   89: ldc 76
    //   91: aload_0
    //   92: invokestatic 74	android/util/Log:e	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    //   95: pop
    //   96: aconst_null
    //   97: areturn
    //   98: aload_2
    //   99: aload_3
    //   100: iconst_0
    //   101: iload_1
    //   102: invokevirtual 80	java/security/MessageDigest:update	([BII)V
    //   105: goto -84 -> 21
    //   108: astore_2
    //   109: new 82	java/lang/RuntimeException
    //   112: dup
    //   113: ldc 84
    //   115: aload_2
    //   116: invokespecial 87	java/lang/RuntimeException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   119: athrow
    //   120: astore_2
    //   121: aload_0
    //   122: invokevirtual 66	java/io/InputStream:close	()V
    //   125: aload_2
    //   126: athrow
    //   127: astore_0
    //   128: ldc 8
    //   130: ldc 89
    //   132: aload_0
    //   133: invokestatic 74	android/util/Log:e	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    //   136: pop
    //   137: aload_2
    //   138: areturn
    //   139: astore_0
    //   140: ldc 8
    //   142: ldc 89
    //   144: aload_0
    //   145: invokestatic 74	android/util/Log:e	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    //   148: pop
    //   149: goto -24 -> 125
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	152	0	paramFile	File
    //   26	76	1	i	int
    //   5	94	2	localObject	Object
    //   108	8	2	localIOException	java.io.IOException
    //   120	18	2	str	String
    //   20	80	3	arrayOfByte	byte[]
    // Exception table:
    //   from	to	target	type
    //   0	6	74	java/security/NoSuchAlgorithmException
    //   6	15	86	java/io/FileNotFoundException
    //   21	27	108	java/io/IOException
    //   31	68	108	java/io/IOException
    //   98	105	108	java/io/IOException
    //   21	27	120	finally
    //   31	68	120	finally
    //   98	105	120	finally
    //   109	120	120	finally
    //   68	72	127	java/io/IOException
    //   121	125	139	java/io/IOException
  }
  
  public static boolean checkMD5(String paramString, File paramFile)
  {
    if ((TextUtils.isEmpty(paramString)) || (paramFile == null))
    {
      Log.e("MD5", "MD5 string empty or updateFile null");
      return false;
    }
    paramFile = calculateMD5(paramFile);
    if (paramFile == null)
    {
      Log.e("MD5", "calculatedDigest null");
      return false;
    }
    Log.v("MD5", "Calculated digest: " + paramFile);
    Log.v("MD5", "Provided digest: " + paramString);
    return paramFile.equalsIgnoreCase(paramString);
  }
}


/* Location:              /home/enzo/Documents/hacking/malwares/viking-horde/classes.jar!/com/fa/c/MD5.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */