Пример #1
0
        public void Decode_MessageWithKeyAndN_ReturnsMessageDecodedForXorNCipherForEnglishAlphabet(
            string message, string key, string decodedMessage)
        {
            var xorCipher = new XORNCipher(new EnglishAlphabet());

            var decoded = xorCipher.Decode(message, key);

            Assert.Equal(decodedMessage, decoded);
        }
Пример #2
0
        public void Encode_MessageWithKeyAndN_ReturnsMessageEncodedForXorNCipherForUkrainianAlphabet(
            string message, string key, string encodedMessage)
        {
            var xorCipher = new XORNCipher(new UkrainianAlphabet());

            var encoded = xorCipher.Encode(message, key);

            Assert.Equal(encodedMessage, encoded);
        }