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); }
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; }