decryptPhraseHex function

String decryptPhraseHex(
  1. int factor,
  2. String encryptedPhrase
)

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

Implementation

String decryptPhraseHex(int factor, String encryptedPhrase) {
  List<String> decryptedWords = [];
  List<String> wordList = encryptedPhrase.split('=>');
  for (var i = 0; i < wordList.length; i++) {
    String result = decryptWordHex(factor, wordList[i]);
    decryptedWords.add(result);
  }
  String newlyDecryptedString = decryptedWords.join(' ');
  return newlyDecryptedString;
}