Exemplo n.º 1
0
        // Token: 0x060008E8 RID: 2280 RVA: 0x0003A650 File Offset: 0x00038850
        public Stream kmethod_1567(Class_233 arg_0, CancellationToken?arg_1 = null)
        {
            if (arg_0 == null)
            {
                throw new ArgumentNullException("node");
            }
            if (arg_0.prop_1 != Class_235.File)
            {
                throw new ArgumentException("Invalid node");
            }
            Class_234 class_ = arg_0 as Class_234;

            if (class_ == null)
            {
                throw new ArgumentException("node must implement INodeCrypto");
            }
            this.gmethod_1583();
            Class_257 arg_2   = new Class_257(arg_0);
            Class_259 class_2 = this.lmethod_1578 <Class_259>(arg_2, null);
            Stream    stream  = new Class_248(new Class_245(this.field_3.vmethod_1545(new Uri(class_2.prop_0))), class_2.prop_1, class_.prop_0, class_.prop_2, class_.prop_3);

            if (arg_1 != null)
            {
                stream = new Class_246(stream, arg_1.Value);
            }
            return(stream);
        }
Exemplo n.º 2
0
        // Token: 0x060008E9 RID: 2281 RVA: 0x0003A708 File Offset: 0x00038908
        public Stream lmethod_1568(Uri arg_0, CancellationToken?arg_1 = null)
        {
            if (arg_0 == null)
            {
                throw new ArgumentNullException("uri");
            }
            this.gmethod_1583();
            string str_;

            byte[] byteDizi_;
            byte[] byteDizi_2;
            byte[] byteDizi_3;
            this.vmethod_1585(arg_0, out str_, out byteDizi_, out byteDizi_2, out byteDizi_3);
            Class_258 arg_2  = new Class_258(str_);
            Class_259 class_ = this.lmethod_1578 <Class_259>(arg_2, null);
            Stream    stream = new Class_248(new Class_245(this.field_3.vmethod_1545(new Uri(class_.prop_0))), class_.prop_1, byteDizi_3, byteDizi_, byteDizi_2);

            if (arg_1 != null)
            {
                stream = new Class_246(stream, arg_1.Value);
            }
            return(stream);
        }
Exemplo n.º 3
0
        // Token: 0x060008ED RID: 2285 RVA: 0x0003A904 File Offset: 0x00038B04
        public Class_233 tmethod_1572(Stream stream_, string str_0, Class_233 arg_0, DateTime?arg_1 = null, CancellationToken?arg_2 = null)
        {
            if (stream_ == null)
            {
                throw new ArgumentNullException("stream");
            }
            if (string.IsNullOrEmpty(str_0))
            {
                throw new ArgumentNullException("name");
            }
            if (arg_0 == null)
            {
                throw new ArgumentNullException("parent");
            }
            if (arg_0.prop_1 == Class_235.File)
            {
                throw new ArgumentException("Invalid parent node");
            }
            this.gmethod_1583();
            if (arg_2 != null)
            {
                stream_ = new Class_246(stream_, arg_2.Value);
            }
            string   text = string.Empty;
            int      num  = 0;
            TimeSpan timeSpan;

            while (this.field_2.prop_2.nmethod_1(++num, out timeSpan))
            {
                Class_279 arg_3   = new Class_279(stream_.Length);
                Class_280 class_  = this.lmethod_1578 <Class_280>(arg_3, null);
                Class_227 class_2 = Class_227.Ok;
                using (Class_247 class_3 = new Class_247(stream_))
                {
                    long  num2  = 0L;
                    int[] array = this.lmethod_1588(class_3.prop_0, class_3.Length).ToArray <int>();
                    Uri   arg_4 = null;
                    for (int i = 0; i < array.Length; i++)
                    {
                        text = string.Empty;
                        int    num3   = array[i];
                        byte[] buffer = new byte[num3];
                        class_3.Read(buffer, 0, num3);
                        using (MemoryStream memoryStream = new MemoryStream(buffer))
                        {
                            arg_4 = new Uri(class_.prop_0 + "/" + num2);
                            num2 += (long)num3;
                            try
                            {
                                text = this.field_3.cmethod_1544(arg_4, memoryStream);
                                long num4;
                                if (string.IsNullOrEmpty(text))
                                {
                                    class_2 = Class_227.Ok;
                                }
                                else if (text.FromBase64().Length != 27 && long.TryParse(text, out num4))
                                {
                                    class_2 = (Class_227)num4;
                                    break;
                                }
                            }
                            catch (Exception arg_5)
                            {
                                class_2 = Class_227.RequestFailedRetry;
                                EventHandler <Class_222> eventHandler = this.field_10;
                                if (eventHandler != null)
                                {
                                    eventHandler(this, new Class_222(arg_4, num, timeSpan, class_2, arg_5));
                                }
                                break;
                            }
                        }
                    }
                    if (class_2 == Class_227.Ok)
                    {
                        byte[] data   = Class_223.kmethod_1477(new Class_254(str_0, stream_, arg_1), class_3.prop_0);
                        byte[] array2 = new byte[32];
                        for (int j = 0; j < 8; j++)
                        {
                            array2[j]      = (class_3.prop_0[j] ^ class_3.prop_1[j]);
                            array2[j + 16] = class_3.prop_1[j];
                        }
                        for (int k = 8; k < 16; k++)
                        {
                            array2[k]      = (class_3.prop_0[k] ^ class_3.prop_2[k - 8]);
                            array2[k + 16] = class_3.prop_2[k - 8];
                        }
                        byte[]    data2 = Class_223.smethod_1470(array2, this.field_7);
                        Class_255 arg_6 = Class_255.gmethod_1743(arg_0, data.ToBase64(), data2.ToBase64(), array2, text);
                        return(this.lmethod_1578 <Class_262>(arg_6, this.field_7).prop_0[0]);
                    }
                    EventHandler <Class_222> eventHandler2 = this.field_10;
                    if (eventHandler2 != null)
                    {
                        eventHandler2(this, new Class_222(arg_4, num, timeSpan, class_2, text));
                    }
                    if (class_2 == Class_227.RequestFailedRetry || class_2 == Class_227.RequestFailedPermanetly || class_2 == Class_227.TooManyRequests)
                    {
                        this.smethod_1580(timeSpan);
                        stream_.Seek(0L, SeekOrigin.Begin);
                        continue;
                    }
                    throw new Class_224(class_2);
                }
                break;
            }
            throw new Class_226(text);
        }