encryptLetterHex function
This function encrypts letters as hexadecimal numbers, not decimal numbers.
Implementation
String encryptLetterHex(int factor, String letter) {
String result = 'pass';
List<String> myList = [
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z'
];
for (var i = 0; i < myList.length; i++) {
if (myList[i] == letter) {
result = decToHex(((myList.indexOf(letter) + 1) * factor));
break;
} else {}
}
return result;
}