コード例 #1
0
 public void method_8()
 {
     if (_class1920 == null)
     {
         throw new InvalidOperationException("Closed");
     }
     if (_class1930 == null)
     {
         return;
     }
     if (_int0 == 8)
     {
         if ((_int1 & 8) != 0)
         {
             var array = new byte[2048];
             while (Read(array, 0, array.Length) > 0)
             {
             }
             return;
         }
         Long0 -= Class1960.method_12();
         var expr67 = Class2010;
         expr67.method_2(expr67.method_1() + Class1960.method_13());
     }
     if (Class2010.method_1() > Long0 && Long0 >= 0L)
     {
         Class2010.method_2((int)(Class2010.method_1() - Long0));
     }
     else
     {
         Long0 -= Class2010.method_1();
         Class2010.method_2(0);
         while (Long0 != 0L)
         {
             var num = (int)method_0(Long0 & 4294967295L);
             if (num <= 0)
             {
                 throw new ZipException("Zip archive ends early.");
             }
             Long0 -= num;
         }
     }
     method_7(false);
 }
コード例 #2
0
 private int method_11(byte[] byte0, int int2, int int3)
 {
     if (!method_4())
     {
         throw new ZipException("Library cannot extract this entry. Version required is (" +
                                _class1930.method_11() + ")");
     }
     if (_class1930.method_0())
     {
         if (_password == null)
         {
             throw new ZipException("No password set.");
         }
         var @class = new Class208();
         var rgbKey = Class207.smethod_0(Class186.smethod_3(_password));
         Class2010.method_12(@class.CreateDecryptor(rgbKey, null));
         var array = new byte[12];
         Class2010.method_7(array, 0, 12);
         if (array[11] != _class1930.method_2())
         {
             throw new ZipException("Invalid password");
         }
         if (Long0 >= 12L)
         {
             Long0 -= 12L;
         }
         else if ((_class1930.method_4() & 8) == 0)
         {
             throw new ZipException(string.Format("Entry compressed size {0} too small for encryption", Long0));
         }
     }
     else
     {
         Class2010.method_12(null);
     }
     if (_int0 == 8 && Class2010.method_1() > 0)
     {
         Class2010.method_3(Class1960);
     }
     _delegate50 = method_12;
     return(method_12(byte0, int2, int3));
 }