Ejemplo n.º 1
0
        public void TestKeyExpansion()
        {
            byte[] inputKey = { 0x11, 0x22, 0x33, 0x44,
                                0x55, 0x66, 0x77, 0x88,
                                0x99, 0x00, 0xaa, 0xbb,
                                0xcc, 0xdd, 0xee, 0xff };
            string expectedKeyString = "11 55 99 CC D1 84 1D D1 1B 9F 82 53 AF 30 B2 E1 35 05 B7 56 53 56 E1 B7 E3 B5 54 E3 1B AE FA 19 07 A9 53 4A EE 47 14 5E 78 3F 2B 75 \n" +
                                       "22 66 00 DD 0A 6C 6C B1 4D 21 4D FC E4 C5 88 74 36 F3 7B 0F 11 E2 99 96 77 95 0C 9A 1F 8A 86 1C 14 9E 18 04 C5 5B 43 47 10 4B 08 4F \n" +
                                       "33 77 AA EE 25 52 F8 16 0B 59 A1 B7 30 69 C8 7F E3 8A 42 3D 26 AC EE D3 66 CA 24 F7 87 4D 69 9E EB A6 CF 51 8D 2B E4 B5 C4 EF 0B BE \n" +
                                       "44 88 BB FF 0F 87 3C C3 31 B6 8A 49 DC 6A E0 A9 24 4E AE 07 95 DB 75 72 3C E7 92 E0 2D CA 58 B8 F9 33 6B D3 2F 1C 77 A4 77 6B 1C B8 \n";

            Key key = new Key(inputKey);

            Console.Out.WriteLine("key:\n" + key);
            Assert.AreEqual(key.ToString(), expectedKeyString);
        }