示例#1
0
        public void method_4(string string_1)
        {
            Class208 @class = new Class208();

            byte[] rgbKey = Class207.smethod_0(Class186.smethod_3(string_1));
            this.icryptoTransform_0 = @class.CreateEncryptor(rgbKey, null);
        }
示例#2
0
 public static byte[] smethod_3(string string_0)
 {
     if (string_0 == null)
     {
         return(new byte[0]);
     }
     return(Encoding.GetEncoding(Class186.smethod_0()).GetBytes(string_0));
 }
示例#3
0
 public static string smethod_1(byte[] byte_0, int int_1)
 {
     if (byte_0 == null)
     {
         return(string.Empty);
     }
     return(Encoding.GetEncoding(Class186.smethod_0()).GetString(byte_0, 0, int_1));
 }
示例#4
0
 public static byte[] smethod_4(int int_1, string string_0)
 {
     if (string_0 == null)
     {
         return(new byte[0]);
     }
     if ((int_1 & 2048) != 0)
     {
         return(Encoding.UTF8.GetBytes(string_0));
     }
     return(Class186.smethod_3(string_0));
 }
示例#5
0
 public static string smethod_2(int int_1, byte[] byte_0)
 {
     if (byte_0 == null)
     {
         return(string.Empty);
     }
     if ((int_1 & 2048) != 0)
     {
         return(Encoding.UTF8.GetString(byte_0, 0, byte_0.Length));
     }
     return(Class186.smethod_1(byte_0, byte_0.Length));
 }
示例#6
0
 private int method_11(byte[] byte_0, int int_2, int int_3)
 {
     if (!this.method_4())
     {
         throw new ZipException("Library cannot extract this entry. Version required is (" + this.class193_0.method_11().ToString() + ")");
     }
     if (this.class193_0.method_0())
     {
         if (this.password == null)
         {
             throw new ZipException("No password set.");
         }
         Class208 @class = new Class208();
         byte[]   rgbKey = Class207.smethod_0(Class186.smethod_3(this.password));
         this.class201_0.method_12(@class.CreateDecryptor(rgbKey, null));
         byte[] array = new byte[12];
         this.class201_0.method_7(array, 0, 12);
         if (array[11] != this.class193_0.method_2())
         {
             throw new ZipException("Invalid password");
         }
         if (this.long_0 >= 12L)
         {
             this.long_0 -= 12L;
         }
         else if ((this.class193_0.method_4() & 8) == 0)
         {
             throw new ZipException(string.Format("Entry compressed size {0} too small for encryption", this.long_0));
         }
     }
     else
     {
         this.class201_0.method_12(null);
     }
     if (this.int_0 == 8 && this.class201_0.method_1() > 0)
     {
         this.class201_0.method_3(this.class196_0);
     }
     this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_12);
     return(this.method_12(byte_0, int_2, int_3));
 }
示例#7
0
        public Class193 method_5()
        {
            if (this.class192_0 == null)
            {
                throw new InvalidOperationException("Closed.");
            }
            if (this.class193_0 != null)
            {
                this.method_8();
            }
            int num = this.class201_0.method_10();

            if (num != 33639248 && num != 101010256 && num != 84233040 && num != 117853008)
            {
                if (num != 101075792)
                {
                    if (num == 808471376 || num == 134695760)
                    {
                        num = this.class201_0.method_10();
                    }
                    if (num != 67324752)
                    {
                        throw new ZipException("Wrong Local header signature: 0x" + string.Format("{0:X}", num));
                    }
                    short int_ = (short)this.class201_0.method_9();
                    this.int_1 = this.class201_0.method_9();
                    this.int_0 = this.class201_0.method_9();
                    uint num2 = (uint)this.class201_0.method_10();
                    int  num3 = this.class201_0.method_10();
                    this.long_0 = (long)this.class201_0.method_10();
                    this.long_1 = (long)this.class201_0.method_10();
                    int    num4  = this.class201_0.method_9();
                    int    num5  = this.class201_0.method_9();
                    bool   flag  = (this.int_1 & 1) == 1;
                    byte[] array = new byte[num4];
                    this.class201_0.method_5(array);
                    string string_ = Class186.smethod_2(this.int_1, array);
                    this.class193_0 = new Class193(string_, (int)int_);
                    this.class193_0.method_5(this.int_1);
                    this.class193_0.method_28((Enum31)this.int_0);
                    if ((this.int_1 & 8) == 0)
                    {
                        this.class193_0.method_26((long)num3 & 4294967295L);
                        this.class193_0.method_22(this.long_1 & 4294967295L);
                        this.class193_0.method_24(this.long_0 & 4294967295L);
                        this.class193_0.method_3((byte)(num3 >> 24 & 255));
                    }
                    else
                    {
                        if (num3 != 0)
                        {
                            this.class193_0.method_26((long)num3 & 4294967295L);
                        }
                        if (this.long_1 != 0L)
                        {
                            this.class193_0.method_22(this.long_1 & 4294967295L);
                        }
                        if (this.long_0 != 0L)
                        {
                            this.class193_0.method_24(this.long_0 & 4294967295L);
                        }
                        this.class193_0.method_3((byte)(num2 >> 8 & 255u));
                    }
                    this.class193_0.method_18((long)((ulong)num2));
                    if (num5 > 0)
                    {
                        byte[] array2 = new byte[num5];
                        this.class201_0.method_5(array2);
                        this.class193_0.method_30(array2);
                    }
                    this.class193_0.method_31(true);
                    if (this.class193_0.method_23() >= 0L)
                    {
                        this.long_0 = this.class193_0.method_23();
                    }
                    if (this.class193_0.method_21() >= 0L)
                    {
                        this.long_1 = this.class193_0.method_21();
                    }
                    if (this.int_0 == 0 && ((!flag && this.long_0 != this.long_1) || (flag && this.long_0 - 12L != this.long_1)))
                    {
                        throw new ZipException("Stored, but compressed != uncompressed");
                    }
                    if (this.class193_0.method_34())
                    {
                        this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_11);
                    }
                    else
                    {
                        this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_10);
                    }
                    return(this.class193_0);
                }
            }
            this.Close();
            return(null);
        }