Added more controls to the skeleton, added a base class, updated some elements

This commit is contained in:
amazing-username
2017-03-26 19:48:21 -05:00
parent 2d6b7d27e8
commit 9894385576
11 changed files with 187 additions and 97 deletions
+7 -13
View File
@@ -9,28 +9,28 @@ Decryption::Decryption()
{
}
void Decryption::setMessage(const std::string message)
Decryption::Decryption(const std::string& message)
{
this->message = message;
}
void Decryption::decryptMessage()
{
GenerateKeys gk;
readFromFile.open("encryptedFile.txt", std::ios::in);
ioEvent.open("encryptedFile.txt", std::ios::in);
std::string messageToBeDecrypted, decryptedMessage;
while(!readFromFile.eof())
while(!ioEvent.eof())
{
char whiteSpace = static_cast<char>(32);
//std::cout << "Am I stuck?" << std::endl;
getline(readFromFile, messageToBeDecrypted, whiteSpace);
getline(ioEvent, messageToBeDecrypted, whiteSpace);
}
readFromFile.close();
ioEvent.close();
unsigned short encryptedTwoKey = 2;
unsigned short beginningOfAlphabetLowerCase = 97;
@@ -67,9 +67,3 @@ void Decryption::decryptMessage()
}
setMessage(decryptedMessage);
}
std::string Decryption::getMessage() const
{
return message;
}