예제 #1
0
 // Token: 0x060000C2 RID: 194 RVA: 0x00006F64 File Offset: 0x00005164
 internal static void lmethod_98(byte[] byteDizi_0, byte[] byteDizi_1)
 {
     byte[] array  = Class_29.Clone(byteDizi_0);
     byte[] array2 = new byte[16];
     for (int i = 0; i < 16; i++)
     {
         byte b = byteDizi_1[i];
         for (int j = 7; j >= 0; j--)
         {
             if (((int)b & 1 << j) != 0)
             {
                 Class_34.cmethod_104(array2, array);
             }
             bool flag = (array[15] & 1) > 0;
             Class_34.xmethod_101(array);
             if (flag)
             {
                 byte[] array3 = array;
                 int    num    = 0;
                 array3[num] = array3[num];
             }
         }
     }
     Array.Copy(array2, 0, byteDizi_0, 0, 16);
 }
예제 #2
0
 // Token: 0x060000BC RID: 188 RVA: 0x00006D18 File Offset: 0x00004F18
 private void gmethod_93(bool bool_0)
 {
     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;
     if (this.field_4 != null)
     {
         Array.Clear(this.field_4, 0, this.field_4.Length);
     }
     if (bool_0)
     {
         this.field_12 = null;
     }
     this.field_1.pmethod_109();
 }
예제 #3
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;
        }