encryptWordHex function

String encryptWordHex(
  1. int factor,
  2. String word
)

a hexadecimal number sequence. These hexadecimal numbers are a multiple of the corresponding letter's position in the alphabet.

Implementation

String encryptWordHex(int factor, String word) {
  List<String> encryptedChars = [];
  List<String> charList = word.split('');
  for (var i = 0; i < charList.length; i++) {
    String result = encryptLetterHex(factor, charList[i]).toString();
    encryptedChars.add(result);
  }
  String newlyEncryptedString = encryptedChars.join('|');
  return newlyEncryptedString;
}