Issue #1 #2 #4 are addressed in this commit. Added another window with controls for key management. Simple ASCII encryption

This commit is contained in:
amazing-username
2017-03-27 21:27:28 -05:00
parent 9894385576
commit 3f5d67e4cf
10 changed files with 194 additions and 16 deletions
+15
View File
@@ -1,4 +1,6 @@
#include <ios>
#include <iostream>
#include <string>
#include "Encryption.h"
#include "GenerateKeys.h"
@@ -13,6 +15,10 @@ Encryption::Encryption(const std::string& message)
}
void Encryption::setEncryptedMessage(const std::string& encryptedMessage)
{
this->encryptedMessage = encryptedMessage;
}
void Encryption::encryptMessage()
{
GenerateKeys* gk = new GenerateKeys;
@@ -21,9 +27,18 @@ void Encryption::encryptMessage()
for (unsigned short indexOfString = 0; indexOfString < message.size(); indexOfString++)
{
ioEvent << gk->encryptedCharacters[message.at(indexOfString)];
encryptedMessage += std::to_string(gk->encryptedCharacters[message.at(indexOfString)]);
std::cout << encryptedMessage << std::endl;
}
setEncryptedMessage(encryptedMessage);
ioEvent.close();
delete gk;
}
std::string Encryption::getEncryptedMessage() const
{
return encryptedMessage;
}