Exemple #1
0
        private bool method_0(BitStream stream0_0, out byte byte_0)
        {
            Class122 class2 = this.class121_0.method_9();

            if (class2 == null)
            {
                throw new ApplicationException("The tree cannot be empty.");
            }
            while (class2.method_8() != null)
            {
                int num = stream0_0.method_4();
                if (num < 0)
                {
                    byte_0 = 0;
                    return(false);
                }
                if (num != 0)
                {
                    if (num != 1)
                    {
                        throw new ApplicationException("Invalid bit in the stream.");
                    }
                    class2 = class2.method_10();
                }
                else
                {
                    class2 = class2.method_8();
                    continue;
                }
            }
            if (class2.method_6() == Enum29.const_1)
            {
                byte_0 = 0;
                return(false);
            }
            int num2 = (class2.method_6() == Enum29.const_0) ? stream0_0.ReadByte() : class2.method_4();

            if (num2 < 0)
            {
                byte_0 = 0;
                return(false);
            }
            this.class121_0.method_0((byte)num2);
            byte_0 = (byte)num2;
            return(true);
        }
Exemple #2
0
        public byte[] Encrypt(byte[] data)
        {
            byte[] buffer2;
            try
            {
                using (MemoryStream stream = new MemoryStream())
                {
                    using (BitStream bitStream = new BitStream(stream, BitStreamMode.Write))
                    {
                        bitStream.method_1(false);
                        for (int i = 0; i < data.Length; i++)
                        {
                            Class122 class2 = this.class121_0.method_2(data[i]);
                            if (class2 == null)
                            {
                                class2 = this.class121_0.method_3();
                            }

                            int[] numArray = this.class121_0.method_1(class2);
                            bitStream.method_3(numArray, 0, numArray.Length);
                            if (class2.method_6() == Enum29.const_0)
                            {
                                bitStream.WriteByte(data[i]);
                            }

                            this.class121_0.method_0(data[i]);
                        }

                        int[] numArray2 = this.class121_0.method_1(this.class121_0.method_4());
                        bitStream.method_3(numArray2, 0, numArray2.Length);
                        bitStream.Close();
                        byte[] buffer = new byte[(int)stream.Length];
                        stream.Position = 0L;
                        stream.Read(buffer, 0, buffer.Length);
                        bitStream.Dispose();
                        stream.Dispose();
                        buffer2 = buffer;
                    }
                }
            }
            catch (Exception exception)
            {
                throw exception;
            }

            return(buffer2);
        }
Exemple #3
0
        private string method_11(Class122 class122_1, int int_2)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(string.Concat(new object[] { this.method_12(int_2), "Type: ", class122_1.method_6(), Environment.NewLine }));
            builder.Append(string.Concat(new object[] { this.method_12(int_2), "Number: ", class122_1.method_0(), Environment.NewLine }));
            builder.Append(string.Concat(new object[] { this.method_12(int_2), "Count: ", class122_1.method_2(), Environment.NewLine }));
            builder.Append(string.Concat(new object[] { this.method_12(int_2), "Value: ", class122_1.method_4(), "(", char.IsControl((char)class122_1.method_4()) ? '-' : ((char)class122_1.method_4()), ")", Environment.NewLine }));
            if (class122_1.method_8() != null)
            {
                builder.Append(this.method_12(int_2 + 1) + "---- Left ----" + Environment.NewLine);
                builder.Append(this.method_11(class122_1.method_8(), int_2 + 1));
            }
            if (class122_1.method_10() != null)
            {
                builder.Append(this.method_12(int_2 + 1) + "---- Right ----" + Environment.NewLine);
                builder.Append(this.method_11(class122_1.method_10(), int_2 + 1));
            }
            return(builder.ToString());
        }