Esempio n. 1
0
        // Token: 0x060008EF RID: 2287 RVA: 0x0003AD4C File Offset: 0x00038F4C
        public Class_233 cmethod_1574(Class_233 arg_0, string str_0)
        {
            Class_239.NClass_7 nclass_ = new Class_239.NClass_7();
            nclass_.field_12 = arg_0;
            if (nclass_.field_12 == null)
            {
                throw new ArgumentNullException("node");
            }
            if (nclass_.field_12.prop_1 != Class_235.Directory && nclass_.field_12.prop_1 != Class_235.File)
            {
                throw new ArgumentException("Invalid node type");
            }
            if (string.IsNullOrEmpty(str_0))
            {
                throw new ArgumentNullException("newName");
            }
            Class_234 class_ = nclass_.field_12 as Class_234;

            if (class_ == null)
            {
                throw new ArgumentException("node must implement INodeCrypto");
            }
            this.gmethod_1583();
            byte[] data = Class_223.kmethod_1477(new Class_254(str_0, ((Class_241)nclass_.field_12).prop_6), class_.prop_0);
            this.kmethod_1577(new Class_271(nclass_.field_12, data.ToBase64()));
            return(this.smethod_1560().First(new Func <Class_233, bool>(nclass_.nmethod_26)));
        }
Esempio n. 2
0
        // Token: 0x060008E4 RID: 2276 RVA: 0x0003A398 File Offset: 0x00038598
        public Class_233 gmethod_1563(string str_0, Class_233 arg_0)
        {
            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();
            byte[]    byteDizi_ = Class_223.dmethod_1476();
            byte[]    data      = Class_223.kmethod_1477(new Class_254(str_0), byteDizi_);
            byte[]    data2     = Class_223.vmethod_1475(byteDizi_, this.field_7);
            Class_255 arg_      = Class_255.cmethod_1744(arg_0, data.ToBase64(), data2.ToBase64(), byteDizi_);

            return(this.lmethod_1578 <Class_262>(arg_, this.field_7).prop_0[0]);
        }
Esempio 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);
        }