testAllHex function

void testAllHex()

This functions tests all of the above hexadecimal functions.

Implementation

void testAllHex() {
  int factor = 5;
  String testLetter = 'A';
  String testWord = 'TEST';
  String testPhrase = 'HELLO WORLD';
  String hexNumber = 'FA';
  String functionHex = decToHex(factor);
  String functionDecimal = hexToDec(hexNumber);
  String encryptedLetter = encryptLetterHex(factor, testLetter);
  String encryptedWord = encryptWordHex(factor, testWord);
  String encryptedPhrase = encryptPhraseHex(factor, testPhrase);
  String decryptedLetter = decryptLetterHex(factor, encryptedLetter);
  String decryptedWord = decryptWordHex(factor, encryptedWord);
  String decryptedPhrase = decryptPhraseHex(factor, encryptedPhrase);
  print(encryptedLetter);
  print(encryptedWord);
  print(encryptedPhrase);
  print(decryptedLetter);
  print(decryptedWord);
  print(decryptedPhrase);
  print(functionHex);
  print(functionDecimal);
}