Added functionality for Autokey Cipher

This commit is contained in:
2018-05-03 11:37:34 -04:00
parent 35512e34d5
commit 17d59e00d1
2 changed files with 16 additions and 0 deletions

View File

@@ -326,6 +326,9 @@ Fn getCipher(const bool cipherFlags[]){
else if(cipherFlags[MORSE]){
return runMorse;
}
else if(cipherFlags[AUTOKEY]){
return runAutokey;
}
//If it didn't trip one of the flags, there was an error before this
else{
std::cout << "There was an error selecting the appropriate function";

View File

@@ -125,9 +125,22 @@ int main(int argc, char** argv){
testResult = false;
#endif //MORSE_TEST
#ifdef AUTOKEY_TEST
testResult = autokeyTest(errorString);
if(testResult){
resultString += "Autokey Cipher completed successfully\n";
}
else{
resultString += "Autokey Cipher error in " + errorString;
}
errorString = "";
testResult = false;
#endif //AUTOKEY_TEST
std::cout << "Results:\n" << resultString << std::endl;
std::cin.get();
return 0;
}