mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Added functionality for Autokey Cipher
This commit is contained in:
@@ -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";
|
||||
|
||||
13
testMain.hpp
13
testMain.hpp
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user