Exemple #1
0
    // Token: 0x06000648 RID: 1608 RVA: 0x00037394 File Offset: 0x00035594
    public void imethod_1(bool bool_1, Interface6 interface6_0)
    {
        Class188 @class = interface6_0 as Class188;

        if (@class == null)
        {
            throw new ArgumentException("invalid parameter passed to AES init - " + interface6_0.GetType().Name);
        }
        this.uint_2 = this.method_4(@class.method_0(), bool_1);
        this.bool_0 = bool_1;
    }
    private bool method_4(byte[] A_0)
    {
        Class187      class2    = this.class62_0.method_4().method_0();
        Class188      class3    = this.class62_0.method_4().method_2();
        bool          flag      = this.method_0();
        HashAlgorithm algorithm = null;

        if (flag)
        {
            algorithm = new SHA512Managed();
        }
        else
        {
            algorithm = new SHA1Managed();
        }
        byte[] buffer  = new byte[] { 0x5f, 0xb2, 0xad, 1, 12, 0xb9, 0xe1, 0xf6 };
        byte[] buffer2 = algorithm.ComputeHash(this.class299_0.method_12(class2.method_14(), buffer));
        buffer2 = this.class299_0.method_13(buffer2, class2.method_2(), 0);
        byte[] buffer3 = this.method_5(class3.method_0(), class2.method_2(), this.byte_0, buffer2, class2.method_6());
        HMAC   hmac    = null;

        if (flag)
        {
            hmac = new HMACSHA512();
        }
        else
        {
            hmac = new HMACSHA1();
        }
        hmac.Key = this.class299_0.method_13(buffer3, class2.method_6(), 0);
        byte[] buffer4 = hmac.ComputeHash(A_0);
        byte[] buffer5 = new byte[] { 160, 0x67, 0x7f, 2, 0xb2, 0x2c, 0x84, 0x33 };
        byte[] buffer6 = algorithm.ComputeHash(this.class299_0.method_12(class2.method_14(), buffer5));
        buffer6 = this.class299_0.method_13(buffer6, class2.method_2(), 0);
        byte[] buffer7 = this.method_5(class3.method_2(), class2.method_2(), this.byte_0, buffer6, class2.method_6());
        return(this.class299_0.method_15(buffer4, buffer7));
    }