public void Decode_MessageWithTransitionTable_ReturnsMessageDecodedForDoubleTransitionCipher(
            string encodedMessage, int[] rowTransposition, int[] columnTransposition, string decodedMessage)
        {
            var doubleTranspositionCipher = new DoubleTranspositionCipher();

            var decoded = doubleTranspositionCipher.Decode(encodedMessage, rowTransposition, columnTransposition);

            Assert.Equal(decodedMessage, decoded);
        }
Exemplo n.º 2
0
        private static string HandleArguments()
        {
            IKeywordedCipher cipher = new DoubleTranspositionCipher();

            switch (taskType)
            {
            case TaskType.Encryption:
                return(CryptText());

            case TaskType.Decryption:
                return(DecryptText());

            default:
                throw new InvalidOperationException();
            }
        }