Esempio n. 1
0
    internal bool method_0(string A_0)
    {
        Class709 class2 = this.class540_0.method_7();
        IntPtr   ptr    = this.method_2(A_0, class2.method_0(), 0, this.class540_0.method_6().method_12());

        byte[] buffer  = this.method_1(ptr, class2.method_2());
        byte[] buffer2 = this.method_1(ptr, class2.method_4());
        Class946.CryptDestroyKey(ptr);
        byte[] buffer3 = new SHA1Managed().ComputeHash(buffer);
        int    index   = 0;
        int    length  = buffer2.Length;

        while (index < length)
        {
            if (buffer2[index] != buffer3[index])
            {
                return(false);
            }
            index++;
        }
        return(true);
    }
Esempio n. 2
0
    private MemoryStream method_17(MemoryStream A_0)
    {
        byte[]       buffer = new byte[0x10];
        MemoryStream stream = new MemoryStream();
        long         length = A_0.Length;
        int          num2   = 0;

        A_0.Position = 0L;
        uint num3 = 0;

        using (Class945 class2 = new Class945(this.class540_0))
        {
            Class709 class3 = this.class540_0.method_7();
            Class494 class4 = this.class540_0.method_6();
            IntPtr   ptr    = class2.method_2(this.string_0, class3.method_0(), num3, class4.method_12());
            while (num2 < length)
            {
                for (int i = A_0.Read(buffer, 0, 0x10); i < 0x10; i++)
                {
                    buffer[i] = 1;
                }
                buffer = class2.method_1(ptr, buffer);
                stream.Write(buffer, 0, 0x10);
                num2 += 0x10;
                if ((num2 % 0x200) == 0)
                {
                    num3++;
                    Class946.CryptDestroyKey(ptr);
                    ptr = class2.method_2(this.string_0, class3.method_0(), num3, class4.method_12());
                }
            }
            Class946.CryptDestroyKey(ptr);
        }
        stream.Position = 0L;
        return(stream);
    }