encryptPhraseHex function

String encryptPhraseHex(
  1. int factor,
  2. String phrase
)

This function does to phrases what their counterparts do to words. Only in hexadecimal.

Implementation

String encryptPhraseHex(int factor, String phrase) {
  List<String> encryptedWords = [];
  List<String> wordList = phrase.split(' ');
  for (var i = 0; i < wordList.length; i++) {
    String result = encryptWordHex(factor, wordList[i]);
    encryptedWords.add(result);
  }
  String newlyEncryptedString = encryptedWords.join('=>');
  return newlyEncryptedString;
}