Beispiel #1
0
            public virtual bool Equals(PreDecryptInfo info)
            {
                if (cmd != info.cmd)
                {
                    return(false);
                }
                if (!Equals(input, info.input))
                {
                    return(false);
                }
                if (!Equals(output, info.output))
                {
                    return(false);
                }

                return(true);
            }
Beispiel #2
0
        private static void addInfo(sbyte[] input, sbyte[] output, int cmd)
        {
            PreDecryptInfo info = new PreDecryptInfo(input, output, cmd);

            for (int i = 0; i < preDecrypts.Length; i++)
            {
                if (info.Equals(preDecrypts[i]))
                {
                    Console.WriteLine(string.Format("PreDecrypt.xml: duplicate entry {0}", info));
                    return;
                }
            }

            PreDecryptInfo[] newPreDecrypts = new PreDecryptInfo[preDecrypts.Length + 1];
            Array.Copy(preDecrypts, 0, newPreDecrypts, 0, preDecrypts.Length);
            newPreDecrypts[preDecrypts.Length] = info;

            preDecrypts = newPreDecrypts;
        }