Пример #1
0
 // Token: 0x060000D8 RID: 216 RVA: 0x000072E4 File Offset: 0x000054E4
 public Class_41(Class_44 arg_0, byte[] byteDizi_0, int sayıInt_0, int sayıInt_1)
 {
     if (byteDizi_0 == null)
     {
         throw new ArgumentNullException("iv");
     }
     if (arg_0 == null)
     {
         throw new ArgumentNullException("parameters");
     }
     this.field_1 = arg_0;
     this.field_0 = new byte[sayıInt_1];
     Array.Copy(byteDizi_0, sayıInt_0, this.field_0, 0, sayıInt_1);
 }
Пример #2
0
        // Token: 0x060000B8 RID: 184 RVA: 0x00006848 File Offset: 0x00004A48
        public virtual void pmethod_89(bool bool_0, Class_44 arg_0)
        {
            this.field_7  = bool_0;
            this.field_12 = null;
            if (arg_0 is Class_26)
            {
                Class_26 class_ = (Class_26)arg_0;
                this.field_14 = class_.gmethod_73();
                this.field_3  = class_.tmethod_72();
                int num = class_.prop_1;
                if (num < 96 || num > 128 || num % 8 != 0)
                {
                    throw new ArgumentException("Invalid value for MAC size: " + num.ToString());
                }
                this.field_13 = num / 8;
                this.field_11 = class_.prop_0;
            }
            else
            {
                if (!(arg_0 is Class_41))
                {
                    throw new ArgumentException("invalid parameters passed to GCM");
                }
                Class_41 class_2 = (Class_41)arg_0;
                this.field_14 = class_2.cmethod_114();
                this.field_3  = null;
                this.field_13 = 16;
                this.field_11 = (Class_39)class_2.prop_0;
            }
            int num2 = bool_0 ? 16 : (16 + this.field_13);

            this.field_4 = new byte[num2];
            if (this.field_14 == null || this.field_14.Length < 1)
            {
                throw new ArgumentException("IV must be at least 1 byte");
            }
            if (this.field_3 == null)
            {
                this.field_3 = new byte[0];
            }
            this.field_1.dmethod_106(true, this.field_11);
            this.field_8 = new byte[16];
            this.field_1.lmethod_108(this.field_8, 0, this.field_8, 0);
            this.field_2.smethod_110(this.field_8);
            this.field_9 = this.vmethod_95(this.field_3);
            if (this.field_14.Length == 12)
            {
                this.field_10 = new byte[16];
                Array.Copy(this.field_14, 0, this.field_10, 0, this.field_14.Length);
                this.field_10[15] = 1;
            }
            else
            {
                this.field_10 = this.vmethod_95(this.field_14);
                byte[] array = new byte[16];
                Class_33.dmethod_96((ulong)((long)this.field_14.Length * 8L), array, 8);
                Class_34.cmethod_104(this.field_10, array);
                this.field_2.xmethod_111(this.field_10);
            }
            this.field_15 = Class_29.Clone(this.field_9);
            this.field_6  = Class_29.Clone(this.field_10);
            this.field_5  = 0;
            this.field_16 = 0UL;
        }