testAllBinary function
void
testAllBinary()
This functions tests all of the above binary functions.
Implementation
void testAllBinary() {
int factor = 5;
String testLetter = 'A';
String testWord = 'TEST';
String testPhrase = 'HELLO WORLD';
String binaryNumber = '101';
String functionBinary = decToBin(factor);
String functionDecimal = binToDec(binaryNumber);
String encryptedLetter = encryptLetterBinary(factor, testLetter);
String encryptedWord = encryptWordBinary(factor, testWord);
String encryptedPhrase = encryptPhraseBinary(factor, testPhrase);
String decryptedLetter = decryptLetterBinary(factor, encryptedLetter);
String decryptedWord = decryptWordBinary(factor, encryptedWord);
String decryptedPhrase = decryptPhraseBinary(factor, encryptedPhrase);
print(encryptedLetter);
print(encryptedWord);
print(encryptedPhrase);
print(decryptedLetter);
print(decryptedWord);
print(decryptedPhrase);
print(functionBinary);
print(functionDecimal);
}