Beispiel #1
0
        // TODO: current ISimpleCipher interface cannot support these methods, otherwise it'd force any other cipher using the same interface
        // to implement these. They either need to be move only a new interface with its new type or modify the current interface to satisfy these additional methods
        public string EncodeAll(string[] phrases)
        {
            foreach (string phrase in phrases)
            {
                _wordbuilder.Append($"{_wordMapper.MapMultipleTo(phrase.ToCharArray())}, ");
            }

            var encodedPhrases = _wordbuilder.ToString();

            _wordbuilder.Clear();

            return(encodedPhrases);
        }