Esempio n. 1
0
        public void TestECB()
        {
            string[] files = new string[] {
#if MONO
                "ecb_tbl.txt", "ecb_vk.txt", "ecb_vt.txt"
#else
                "UnitTests.ecb_tbl.txt", "UnitTests.ecb_vk.txt", "UnitTests.ecb_vt.txt"
#endif
            };
            RijndaelManaged algo = new RijndaelManaged();

            foreach (string file in files)
            {
                ECBTestReader helper = new ECBTestReader(file);
                foreach (CipherImplementationType type in _types)
                {
                    if (algo.HasImplementation(type))
                    {
                        algo.ImplementationType = type;
                        TestECB(algo, helper);
                    }
                }
            }
        }