encryptPhrase function
This function does to phrases what their counterparts do to words.
Implementation
String encryptPhrase(int factor, String phrase) {
List<String> encryptedWords = [];
List<String> wordList = phrase.split(' ');
for (var i = 0; i < wordList.length; i++) {
String result = encryptWord(factor, wordList[i]);
encryptedWords.add(result);
}
String newlyEncryptedString = encryptedWords.join('=>');
return newlyEncryptedString;
}