示例#1
0
        public void testPlugBoard()
        {
            PlugBoard p = new PlugBoard();

            p.setPlugs("RS TU VW YZ LX MK JI HG EF QP CD ON AB");

            Console.WriteLine(p.swapLetter('R'));
            Console.WriteLine(p.swapLetter('S'));
        }
示例#2
0
        private char encryptLetter(char letter)
        {
            char newLetter = plugBoard.swapLetter(letter);

            newLetter = rotor.encryptLetter(newLetter);

            newLetter = plugBoard.swapLetter(newLetter);

            return(newLetter);
        }